castep_param_io/param/pseudopotentials/
relativistic_treatment.rs1use std::fmt::Display;
2
3use serde::{Deserialize, Serialize};
4
5use crate::param::KeywordDisplay;
6
7#[derive(
18 Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Serialize, Deserialize, Hash, Default,
19)]
20pub enum RelativisticTreatment {
21 Schroedinger,
22 Zora,
23 #[default]
24 KoellingHarmon,
25 Dirac,
26}
27
28impl Display for RelativisticTreatment {
29 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
30 match self {
31 RelativisticTreatment::Schroedinger => f.write_str("sCHROEDINGER"),
32 RelativisticTreatment::Zora => f.write_str("ZORA"),
33 RelativisticTreatment::KoellingHarmon => f.write_str("KOELLING-HARMON"),
34 RelativisticTreatment::Dirac => f.write_str("DIRAC"),
35 }
36 }
37}
38
39impl KeywordDisplay for RelativisticTreatment {
40 fn field(&self) -> String {
41 "RELATIVISTIC_TREATMENT".to_string()
42 }
43}