castep_param_io/param/electro_min/
spin_fix.rs

1use castep_param_derive::KeywordDisplay;
2use serde::{Deserialize, Serialize};
3
4/// This keyword determines the number of electronic iterations for which the
5/// total spin is fixed. If SPIN_FIX is less than 0, the spin will be fixed for
6/// the duration of the calculation.
7/// This keyword only effects the behavior of the electronic minimizer in the initial SCF calculation. There is a separate keyword, GEOM_SPIN_FIX, which should be used to fix the spin of the system during geometry optimization.
8/// # Note
9/// This parameter is only used if FIX_OCCUPANCY : FALSE. So, for insulators the
10/// spin is fixed regardless of the value of SPIN_FIX.
11/// # Default
12/// 10
13/// # Example
14/// `SPIN_FIX : 5`
15#[derive(
16    Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize, Hash, KeywordDisplay,
17)]
18#[keyword_display(field = "SPIN_FIX", from=u32,value=u32,default_value=10)]
19pub struct SpinFix(u32);