Next: , Previous: Scripting, Up: General Features


3.11 Backups and Undo

* Redo:: * Restoring from Backup::

By default, each time a modification is made to a model, the old coordinates are written out 1. The backups are kept in a backup directory and are tagged with the date and the history number (lower numbers are more ancient 2). The “Undo” function discards the current molecule and loads itself from the most recent backup coordinates. Thus you do not have to remember to “Save Changes” - coot will do it for you 3.

If you have made changes to more than one molecule, Coot will pop-up a dialog box in which you should set the “Undo Molecule” i.e. the molecule to which the Undo operations will apply. Further Undo operations will continue to apply to this molecule until there are none left. If another Undo is requested Coot checks to see if there are other molecules that can be undone, if there is exactly one, then that molecule becomes the “Undo Molecule”, if there are more than one, then another Undo selection dialog will be displayed.

You can set the undo molecule using the scripting function:

(set-undo-molecule imol)

If for reasons of strange system4 requirements you want to remove the path components of the backup file name you can do so using:

(set-unpathed-backup-file-names 1)

3.11.1 Redo

The “undone” modifications can be re-done using this button. This is not available immediately after a modification 5.

3.11.2 Restoring from Backup

There may be certain circumstances 6 in which you wish to restore from a backup but can't get it by the “Undo” mechanism described above. In that case, start coot as normal and then open the (typically most recent) coordinates file in the directory coot-backup (or the directory pointed to the environment variable COOT_BACKUP_DIR if it was set) . This file should contain your most recent edits. In such a case, it is sensible for neatness purposes to immediately save the coordinates (probably to the current directory) so that you are not modifying a file in the backup directory.

See also Section Crash.


Footnotes

[1] this might be initially surprising since this could chew up a lot of disk space. However, disk space is cheap compared to losing you molecule.

[2] The coordinates are written in pdb format - that's OK, isn't it?.

[3] unless you tell it not to, of course - use (e.g.) (turn-off-backup 0) to turn off the backup (for molecule 0 in this case).

[4] or system manager.

[5] It works like the “Forwards” buttons in a web browser - which is not available immediately after viewing a new page.

[6] for example, if coot crashes.