castep_param_io/param/basis_set/
fine_gmax.rs

1use castep_param_derive::KeywordDisplayStruct;
2use derive_builder::Builder;
3use serde::{Deserialize, Serialize};
4
5use crate::param::InvLengthUnit;
6
7/// This keyword determines the maximum size of the g-vectors included in the fine grid.
8/// The fine grid is seDefault
9/// -1 a0-1 - this results in the fine and standard grids being identical
10/// # Example
11/// FINE_GMAX : 20 1/angt up such that all g-vectors with |g| less than or equal to FINE_GMAX are included.
12#[derive(
13    Debug, Clone, Copy, Serialize, Deserialize, PartialEq, PartialOrd, Builder, KeywordDisplayStruct,
14)]
15#[builder(setter(into), default)]
16#[keyword_display(field = "FINE_GMAX", display_format="{:20.15} {}", default_value=-1.0, from=f64)]
17pub struct FineGMax {
18    pub max: f64,
19    #[keyword_display(is_option = true)]
20    pub unit: Option<InvLengthUnit>,
21}