Contents
History and Status FilesModel Definition Files
Program Status
Presentations
CCP4 Molecular Graphics Documentation | ||
Saving program status |
Documentation Contents | On-line Documentation | Tutorials | CCP4mg Home |
CCP4mg saves additional information relating to a specific
coordinate file to an extra file with the same name as the coordinate file but
with the extension '.ccp4mg'. If you are reading a coordinate file from a directory for which you do not have write permission then no model definition file will be saved. The same information can also be saved to
more generic files and this data can be applied to more than one coordinate file (see below).
Note that, for CCP4mg version 1.1 onwards the same information is also saved to a status file and the status file takes precedence over the model definition file. This is a change relative to earlier versions of CCP4mg to ensure that restoring a status file really does restore exactly what was originally saved. The model definition file is still effective if a model is loaded and some information is entered before the model is deleted. If the model is reloaded later the information will be restored.
The information currently saved is
The file is in Python pickle format which is not really user readable. The file is read automatically when the coordinate file is loaded. If you move or rename the coordinate file then you need to make the equivalent changes to the .ccp4mg file.
When saving the selection or colour protocols you have the option to save for either the current coordinate file or for all models. If you save for all models the information is saved in the file $HOME/.CCP4MG/generic.ccp4mg and will always be available to restore for any model. A generic .ccp4mg file can be created from the Model definition file menu on the File pull-down menu. Choose to Create new file and enter a file name. When saving the selection or colour protocols you will also have the option to save to this file. This file is then loaded whenever CCP4mg is started unless you remove it with the Remove option on the Model definition file menu.
There are currently three aspects of the program status which can be saved:
Whenever the program status is saved then all three aspects of the status are saved to one file but restoring status may restore only some selected aspect.
The program status is saved automatically on program exit to a file:
$HOME/.CCP4MG/status/last_exit_status.pkl
and if there is an existing file of this name it is renamed:
$HOME/.CCP4MG/status/prev_exit_status.pkl
On restarting the program the user preferences are always restored
from the status file but the selected data and view are only restored
if the Restore data on restart option has been set in
the Session options preferences and the user clicks
OK when prompted.
Save status to file or Restore options
on the File pull-down menu will save the status to file
or restore. You will be presented with a file browser to select a file.
In the Session options preferences
there is also an option to Backup data files on exit.
If this is set on then on exit all loaded data files will copied into the
directory $HOME/.CCP4MG/saved_data_files. Next time the program is run,
if any of the data files
required to restore status no longer exist, then they will be recreated
from the saved data files and the user will be notified that this has
been done.
Beware that on the next exit from the program the saved_data_files
directory will be cleaned out before saving the currently loaded files.
This tool will help if you want to use CCP4mg to make a presentation to an audience or show something in CCP4mg to colleagues. It is a nice interface to saving multiple program status. See Presentations.