castep_param_io/param/geom_opt/
geom_disp_tol.rs

1use castep_param_derive::KeywordDisplayStruct;
2use derive_builder::Builder;
3use serde::{Deserialize, Serialize};
4
5use crate::param::LengthUnit;
6
7#[derive(
8    Debug, Clone, Copy, PartialEq, PartialOrd, Serialize, Deserialize, KeywordDisplayStruct, Builder,
9)]
10#[builder(setter(into, strip_option), default)]
11#[keyword_display(field = "GEOM_DISP_TOL", display_format = "{:20.15} {}", from=f64, default_value=0.001)]
12/// This keyword determines the tolerance for accepting convergence of the ionic
13/// displacement during a geometry optimization.
14/// # Default
15/// 0.001 Å
16/// # Example
17/// `GEOM_DISP_TOL : 0.002 ang`
18pub struct GeomDispTol {
19    pub tol: f64,
20    #[keyword_display(is_option = true)]
21    pub unit: Option<LengthUnit>,
22}