castep_param_io/param/xc_correlation/
xc_functional.rs1use std::fmt::Display;
2
3use serde::{Deserialize, Serialize};
4
5use crate::param::KeywordDisplay;
6
7#[derive(
8 Debug, Clone, Copy, Hash, PartialEq, Eq, PartialOrd, Ord, Default, Serialize, Deserialize,
9)]
10#[allow(clippy::upper_case_acronyms)]
11pub enum XCFunctional {
12 #[default]
13 LDA, PW91, PBE, RPBE, WC, PBESOL, BLYP, HF, #[allow(non_camel_case_types)]
22 HF_LDA, #[allow(non_camel_case_types)]
24 sX, #[allow(non_camel_case_types)]
26 sX_LDA, PBE0, B3LYP, HSE03, HSE06, RSCAN, }
33
34impl Display for XCFunctional {
35 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
36 write!(f, "{:?}", self)
37 }
38}
39
40impl KeywordDisplay for XCFunctional {
41 fn field(&self) -> String {
42 "XC_FUNCTIONAL".to_string()
43 }
44}