castep_param_io/param/general/backup_setting.rs
1use castep_param_derive::KeywordDisplay;
2use serde::{Deserialize, Serialize};
3
4#[derive(
5 Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize, KeywordDisplay,
6)]
7#[keyword_display(specified_fields = true)]
8pub enum BackUpSetting {
9 /// This keyword specifies the interval, in seconds, between updates of the
10 /// backup restart files. This keyword is applicable for geometry optimization,
11 /// molecular dynamics, phonon or transition state search runs.
12 /// A value which is less than or equal to zero indicates that no updates will be performed.
13 #[keyword_display(field = "BACKUP_INTERVAL")]
14 BackupInterval(i64),
15 // This keyword specifies the number of geometry optimization or molecular
16 // dynamics iterations between updates of the backup restart files.
17 #[keyword_display(field = "NUM_BACKUP_ITER")]
18 NumBackupIter(u64),
19}
20
21impl Default for BackUpSetting {
22 fn default() -> Self {
23 Self::NumBackupIter(5)
24 }
25}