castep_param_io/param/density_mixing_params/
mix_charge_gmax.rs

1use castep_param_derive::KeywordDisplayStruct;
2use derive_builder::Builder;
3use serde::{Deserialize, Serialize};
4
5use crate::param::InvLengthUnit;
6
7#[derive(
8    Debug, Clone, Copy, PartialEq, PartialOrd, Serialize, Deserialize, KeywordDisplayStruct, Builder,
9)]
10#[keyword_display(field = "MIX_CHARGE_GMAX", display_format = "{:20.15} {}", from=f64, default_value=1.5)]
11#[builder(setter(strip_option), default)]
12/// This keyword determines the maximum g-vector at which the charge density is mixed
13/// in the density mixing procedure.
14/// # Default
15/// 1.5 Å-1
16/// # Example
17/// MIX_CHARGE_GMAX : 0.89 1/ang
18pub struct MixChargeGmax {
19    pub gmax: f64,
20    #[keyword_display(is_option = true)]
21    pub unit: Option<InvLengthUnit>,
22}