castep_param_io/param/geom_opt/
geom_preconditioner.rs

1use castep_param_derive::KeywordDisplay;
2use serde::{Deserialize, Serialize};
3
4/// This keyword selects the preconditioner used for LBFGS geometry optimization.
5/// Available options are:
6/// - ID - identity; LBFGS is used without a preconditioner.
7/// - EXP - exponential preconditioner.
8/// - FF- forcefield based preconditioner using the scheme of Lindh et al. (1995).
9///
10/// The ID option's only advantage over the BFGS minimizer is lower memory requirements.
11/// The EXP option is generally the best in terms of performance gains.
12/// The forcefield based preconditioner FF can sometimes provide further gains,
13/// although it is less stable and might require more steps to converge.
14/// # Default
15/// ID
16/// # Example
17/// `GEOM_PRECONDITIONER : EXP`
18#[derive(
19    Debug,
20    Default,
21    Clone,
22    Copy,
23    Hash,
24    Serialize,
25    Deserialize,
26    PartialEq,
27    Eq,
28    PartialOrd,
29    Ord,
30    KeywordDisplay,
31)]
32#[keyword_display(field = "GEOM_PRECONDITIONER")]
33#[allow(clippy::upper_case_acronyms)]
34pub enum GeomPreconditioner {
35    #[default]
36    ID,
37    EXP,
38    FF,
39}