castep_param_io/param/basis_set/
finite_basis_spacing.rs

1use castep_param_derive::KeywordDisplayStruct;
2use derive_builder::Builder;
3use serde::{Deserialize, Serialize};
4
5use crate::param::EnergyUnit;
6/// This keyword determines the spacing of cutoff energies used to estimate
7/// the `BasisDeDloge` in automatic calculation of the finite basis set correction.
8/// Points are chosen such that the `CutoffEnergy` corresponds to the highest energy
9/// in the set of `FiniteBasisNPoints` cutoff energies.
10/// # Note
11/// This value is only used if FINITE_BASIS_CORR : 2.
12#[derive(
13    Debug, Clone, Copy, PartialEq, PartialOrd, Serialize, Deserialize, Builder, KeywordDisplayStruct,
14)]
15#[builder(setter(into), default)]
16#[keyword_display(field = "FINITE_BASIS_SPACING", from=f64, default_value=5.0, display_format="{:20.15} {}")]
17pub struct FiniteBasisSpacing {
18    spacing: f64,
19    #[keyword_display(is_option = true)]
20    unit: Option<EnergyUnit>,
21}