castep_param_io/param/xc_correlation/
xc_functional.rs

1use 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, // Local Density Approximation
14    PW91,   // Perdew Wang '91 GGA
15    PBE,    // Perdew Burke Ernzerhof
16    RPBE,   // Revised Perdew Burke Ernzerhof
17    WC,     // Wu-Cohen
18    PBESOL, // PBEsol, PBE functional for solids
19    BLYP,   // Becke Lee Young Parr
20    HF,     // exact exchange, no correlation
21    #[allow(non_camel_case_types)]
22    HF_LDA, // exact exchange, LDA correlation
23    #[allow(non_camel_case_types)]
24    sX, // screened exchange, no correlation
25    #[allow(non_camel_case_types)]
26    sX_LDA, // screened exchange, LDA correlation
27    PBE0,   // PBE0 hybrid functional
28    B3LYP,  // B3LYP hybrid functional
29    HSE03,  // HSE03 hybrid functional
30    HSE06,  // HSE06 hybrid functional
31    RSCAN,  // regularized SCAN meta-GGA functional
32}
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}