castep_param_io/param/geom_opt/
geom_stress_tol.rs

1use castep_param_derive::KeywordDisplayStruct;
2use derive_builder::Builder;
3use serde::{Deserialize, Serialize};
4
5use crate::param::PressureUnit;
6
7#[derive(
8    Debug, Clone, Copy, PartialEq, PartialOrd, Serialize, Deserialize, KeywordDisplayStruct, Builder,
9)]
10#[builder(setter(into, strip_option), default)]
11#[keyword_display(
12    field = "GEOM_STRESS_TOL",
13    display_format = "{:20.15} {}",
14    default_value = 0.1,
15    from=f64,
16)]
17/// This keyword determines the tolerance for accepting convergence of the
18/// maximum stress component during unit cell optimization.
19/// # Default
20/// 0.1 GPa
21/// # Example
22/// `GEOM_STRESS_TOL : 0.2 GPa`
23pub struct GeomStressTol {
24    tol: f64,
25    #[keyword_display(is_option = true)]
26    unit: Option<PressureUnit>,
27}