Backup

Last updated: July 15, 2026

CrySPY provides a simple backup function. The following files and directories are backed up.

  • cryspy.in
  • cryspy.stat
  • log_cryspy
  • err_cryspy
  • debug_cryspy
  • cryspy_interactive.ipynb
  • calc_in/
  • data/

Note that work/ is not included in the backup.

  • (v1.5.0 or later) The progress number and unit are appended to the backup directory name. For a manual backup, manual is also appended. The automatic backup interval can be specified using backup_interval.
  • (v1.1.0 or later) The files and directories listed above are copied to a directory named by date and time. Previous backups are not automatically deleted.
  • (v1.0.0) Only one generation is backed up, and older backups are deleted.

Backup Directory Names (v1.5.0 or Later)

In v1.5.0 or later, the progress number and unit at the time of backup are appended to the backup directory name. Backups are stored under backup/. The date and time are placed at the beginning of the directory name using the following formats.

  • Automatic backup: YYYYMMDD_HHMMSS_<progress_number>_<unit>
  • Manual backup: YYYYMMDD_HHMMSS_manual_<progress_number>_<unit>

The progress units are as follows.

  • RS: struc
    • The progress number is the number of structures with registered results.
  • BO and LAQA: select
    • The progress number is the current selection number.
  • EA and EA-vc: gen
    • The progress number is the current generation number.

Examples of backup directory names are shown below.

  • Automatic backup after completing generation 5 in EA: backup/20260715_143052_5_gen/
  • Automatic backup after completing selection 3 in BO: backup/20260715_143052_3_select/
  • Manual backup in generation 5 in EA: backup/20260715_154210_manual_5_gen/
  • Manual backup in selection 3 in BO: backup/20260715_154210_manual_3_select/
  • Manual backup after registering results for 100 structures in RS: backup/20260715_154210_manual_100_struc/

If a manual backup is performed when the progress number and unit cannot be obtained, such as before initialization, the directory name is YYYYMMDD_HHMMSS_manual.

Automatic Backup

In v1.5.0 or later, the automatic backup interval can be specified using backup_interval in the [option] section of cryspy.in.

For example, to set the automatic backup interval to 5, write:

[option]
backup_interval = 5

The following values can be specified for backup_interval.

  • 0: Disable automatic backups.
  • Positive integer: Perform automatic backups at the specified interval.

The default value and interval unit for each algorithm are as follows.

  • RS
    • The default is 0.
    • Automatic backups using backup_interval are not performed.
    • Divide calculations using tot_struc and perform a manual backup after completion.
  • BO and LAQA
    • The default is 1.
    • Automatic backups are performed in units of selections.
    • An automatic backup is performed immediately before proceeding to the next selection.
  • EA and EA-vc
    • The default is 1.
    • Automatic backups are performed in units of generations.
    • An automatic backup is performed immediately before generating the next-generation structures.

When appending structures, a backup is performed before the structures are appended, independently of the periodic backups controlled by backup_interval.

Manual Backup

To perform a manual backup, run cryspy with the -b or --backup option.

cryspy -b

This command performs only the backup without running the normal calculation process.