castep_param_io/param/electro_min/
smearing_width.rs

1use castep_param_derive::KeywordDisplayStruct;
2use serde::{Deserialize, Serialize};
3
4use crate::param::EnergyUnit;
5
6#[derive(
7    Debug, Clone, Copy, PartialEq, PartialOrd, Serialize, Deserialize, KeywordDisplayStruct,
8)]
9#[keyword_display(field = "SMEARING_WIDTH", from=f64, default_value=0.2, display_format="{:20.15} {}")]
10/// This keyword determines the width of the Fermi-surface smearing if the system
11/// is being treated as a metal.
12/// # Note
13/// This parameter is used only if FIX_OCCUPANCY : FALSE.
14/// # Default
15/// 0.2 eV
16/// # Example
17/// SMEARING_WIDTH : 0.1 eV
18pub struct SmearingWidth {
19    pub width: f64,
20    #[keyword_display(is_option = true)]
21    pub unit: Option<EnergyUnit>,
22}