Awesome, thanks (is this in some manual somewhere?).
Dont know as it is fairly new.
But I am looking for the way to do this automatically - e.g. a script
that gets executed prior to exiting. For instance, coot does warn that
you modified but didn't save your model(s), so is there some way to make
it do the (quick-save) at this point instead?
At the moment there is no way to run a user specified exit script (Note
to Paul and self: should there be?), however you can program your own
exit function which will do what you like and put it in your .coot.py
(optionally make a tool button for it ;-) ):
def my_exit():
imol = first_unsaved_coords_imol()
if imol > -1:
quick_save()
coot_checked_exit(0) # guess coot_real_exit(0) would do here too
Then just call:
my_exit()
Hope this helps,
B
On Tue, 2010-06-08 at 10:56 +0200, Bernhard Lohkamp wrote:
Try:
pythonic:
quick_save()
scheme:
(quick-save)
This will save all pdb files with unsaved changes (using default naming).
B
Is there an elegant way to make coot save modified pdb-files
automatically upon exiting? Just saving all the pdb files will work for
me too.
I am calling coot from a python script so I can in principle scan the
coot-backup folder after session has closed and grab latest files from
there, but maybe there is some python scripting solution? I did try to
rtdm, but may have missed something.
Ed.
--
***************************************************
Dr. Bernhard Lohkamp
Assistant Professor
Div. Molecular Structural Biology
Dept. of Medical Biochemistry and Biophysics (MBB)
Karolinska Institutet
S-17177 Stockholm
Sweden
phone: (+46) 08-52487651
fax: (+46) 08-327626
email: [email protected]