castep_param_io/param/geom_opt/
geom_spin_fix.rs

1use castep_param_derive::KeywordDisplay;
2use serde::{Deserialize, Serialize};
3
4/// This keyword determines the number of geometry optimization steps for which the
5/// total spin is fixed. If GEOM_SPIN_FIX is less than 0, the spin will be fixed to
6/// the value found at the end of the SCF calculation for the initial structure for
7/// the duration of the calculation.
8/// This parameter is only used if FIX_OCCUPANCY = FALSE. So for insulators the spin is fixed regardless of the value of GEOM_SPIN_FIX.
9///
10/// The default value for this parameter is 0, so spin is allowed to vary.
11/// # Example
12/// `GEOM_SPIN_FIX : 5`
13#[derive(
14    Debug,
15    Default,
16    Clone,
17    Copy,
18    PartialEq,
19    Eq,
20    PartialOrd,
21    Ord,
22    Serialize,
23    Deserialize,
24    KeywordDisplay,
25)]
26#[keyword_display(field="GEOM_SPIN_FIX", from=u32,value=u32)]
27pub struct GeomSpinFix(u32);