Files | |
file | ExCorr.h |
file | ExCorr_internal.h |
file | ExCorr_internal_GGA.h |
file | ExCorr_internal_LDA.h |
file | ExCorr_internal_mGGA.h |
Classes | |
class | ExactExchange |
Exact-exchange calculator. More... | |
struct | IncludeTXC |
Which components to include in the results of ExCorr::operator() More... | |
class | ExCorr |
Exchange-Correlation energy calculator. More... | |
class | Functional |
Abstract base class for functionals. More... | |
class | FunctionalGGA |
Common interface to the compute kernels for GGA-like functionals. More... | |
struct | GGA_calc< variant, spinScaling, nCount > |
struct | GGA_calc< variant, true, nCount > |
Specialization of GGA_calc for spin-scaling functionals (exchange and KE) More... | |
struct | GGA_calc< variant, false, nCount > |
Specialization of GGA_calc for functionals that do not spin-scale (correlation) More... | |
struct | GGA_calc< GGA_X_GLLBsc, true, nCount > |
struct | GGA_calc< GGA_X_LB94, true, nCount > |
class | FunctionalLDA |
Common interface to the compute kernels shared by all LDA functionals. More... | |
struct | LDA_calc< variant, nCount > |
struct | LDA_calc< LDA_KE_TF, nCount > |
Specialization of LDA_calc for Thomas-Fermi kinetic energy (compute directly in n[s]) More... | |
struct | LDA_calc< LDA_X_Slater, nCount > |
Specialization of LDA_calc for Slater exchange (compute directly in n[s]; zeta not required) More... | |
struct | LDA_eval_C_PZ< para > |
struct | LDA_eval_C_PW< spinID, prec > |
struct | LDA_eval_C_VWN< spinID > |
class | FunctionalMGGA |
Common interface to the compute kernels for mGGA-like functionals. More... | |
struct | mGGA_calc< variant, spinScaling, nCount > |
struct | mGGA_calc< variant, true, nCount > |
Specialization of mGGA_calc for spin-scaling functionals (exchange) More... | |
struct | mGGA_calc< variant, false, nCount > |
struct | ExCorr_OrbitalDep_GLLBsc |
Orbital-dependent GLLBsc functional. More... | |
Macros | |
#define | SwitchTemplate_spin(SwitchTemplate_functional, variant, nCount, fTemplate, argList) |
#define | SwitchTemplate_GGA(variant, nCount, fTemplate, argList) |
#define | SwitchTemplate_LDA(variant, nCount, fTemplate, argList) |
#define | SwitchTemplate_mGGA(variant, nCount, fTemplate, argList) |
Enumerations | |
enum | ExCorrType { ExCorrLDA_PZ , ExCorrLDA_PW , ExCorrLDA_PW_prec , ExCorrLDA_VWN , ExCorrLDA_Teter , ExCorrGGA_PBE , ExCorrGGA_PBEsol , ExCorrGGA_PW91 , ExCorrMGGA_TPSS , ExCorrMGGA_revTPSS , ExCorrORB_GLLBsc , ExCorrPOT_LB94 , ExCorrHYB_PBE0 , ExCorrHYB_HSE06 , ExCorrHYB_HSE12 , ExCorrHYB_HSE12s , ExCorrHF } |
Types of exchange correlation functionals. More... | |
enum | KineticType { KineticNone , KineticTF , KineticVW , KineticPW91 } |
Types of kinetic energy functionals. More... | |
enum | GGA_Variant { GGA_X_PBE , GGA_C_PBE , GGA_X_PBEsol , GGA_C_PBEsol , GGA_X_PW91 , GGA_C_PW91 , GGA_X_wPBE_SR , GGA_X_GLLBsc , GGA_X_LB94 , GGA_KE_VW , GGA_KE_PW91 } |
Available GGA functionals. More... | |
enum | LDA_Variant { LDA_X_Slater , LDA_C_PZ , LDA_C_PW , LDA_C_PW_prec , LDA_C_VWN , LDA_XC_Teter , LDA_KE_TF } |
Available LDA functionals. More... | |
enum | mGGA_Variant { mGGA_X_TPSS , mGGA_C_TPSS , mGGA_X_revTPSS , mGGA_C_revTPSS } |
Available mGGA functionals. More... | |
Functions | |
__hostanddev__ void | loadSpinVector (array< const double *, 4 > x, int i, double &x0, vector3<> &xVec) |
Utility function for converting to/from spin-density matrices to scalar+vector combinations (via Pauli matrices) | |
__hostanddev__ void | accumSpinVectorGrad (const double &E_x0, const vector3<> &E_xVec, array< double *, 4 > E_x, int i) |
__hostanddev__ void | spinDiagonalize_calc (int i, array< const double *, 4 > n, array< const double *, 4 > x, array< double *, 2 > xDiag) |
Transform spin-density-matrix-like quantity x into the basis where spin-density-matrix n is diagonal, and store the diagonal components in xDiag (for noncollinear magnetism) | |
__hostanddev__ void | spinDiagonalizeGrad_calc (int i, array< const double *, 4 > n, array< const double *, 4 > x, array< const double *, 2 > E_xDiag, array< double *, 4 > E_n, array< double *, 4 > E_x) |
Propagate gradients corresponding to spinDiagonalize_calc(), from E_xDiag and accumulate to E_n and E_x. | |
__hostanddev__ double | spinInterpolation (double zeta, double &f_zeta) |
LDA spin interpolation function f(zeta) and its derivative. | |
template<typename Para , typename Ferro > | |
__hostanddev__ double | spinInterpolate (double rs, double zeta, double &e_rs, double &e_zeta, const Para ¶, const Ferro &ferro) |
Spin-interpolate an LDA functional given its paramagnetic and ferromagnetic functors. | |
template<typename Para , typename Ferro , typename Stiff > | |
__hostanddev__ double | spinInterpolate (double rs, double zeta, double &e_rs, double &e_zeta, const Para ¶, const Ferro &ferro, const Stiff &stiff, const double fDblPrime0=4./(9 *(pow(2., 1./3) -1))) |
template<GGA_Variant variant> | |
__hostanddev__ double | GGA_eval (double rs, double s2, double &e_rs, double &e_s2) |
template<GGA_Variant variant> | |
__hostanddev__ double | GGA_eval (double rs, double zeta, double g, double t2, double &e_rs, double &e_zeta, double &e_g, double &e_t2) |
__hostanddev__ double | slaterExchange (double rs, double &e_rs) |
Slater exchange as a function of rs (PER PARTICLE): | |
__hostanddev__ double | GGA_PBE_exchange (const double kappa, const double mu, double rs, double s2, double &e_rs, double &e_s2) |
PBE GGA exchange [JP Perdew, K Burke, and M Ernzerhof, Phys. Rev. Lett. 77, 3865 (1996)]. | |
template<> | |
__hostanddev__ double | GGA_eval< GGA_X_PBE > (double rs, double s2, double &e_rs, double &e_s2) |
PBE GGA exchange [JP Perdew, K Burke, and M Ernzerhof, Phys. Rev. Lett. 77, 3865 (1996)]. | |
template<> | |
__hostanddev__ double | GGA_eval< GGA_X_PBEsol > (double rs, double s2, double &e_rs, double &e_s2) |
PBEsol GGA exchange [JP Perdew et al, Phys. Rev. Lett. 100, 136406 (2008)]. | |
__hostanddev__ double | GGA_PW91_Enhancement (double s2, double &F_s2, const double P, const double Q, const double R, const double S, const double T, const double U) |
template<> | |
__hostanddev__ double | GGA_eval< GGA_X_PW91 > (double rs, double s2, double &e_rs, double &e_s2) |
PW91 GGA exchange [JP Perdew et al, Phys. Rev. B 46, 6671 (1992)]. | |
template<int n> | |
__hostanddev__ double | integralErfcGaussian (double A, double B, double &result_A, double &result_B) |
Evaluate \( \int_0^\infty dy y^n e^{-Ay^2} \textrm{erfc}{By} \) and its derivatives. | |
template<> | |
__hostanddev__ double | integralErfcGaussian< 1 > (double A, double B, double &result_A, double &result_B) |
template<> | |
__hostanddev__ double | integralErfcGaussian< 2 > (double A, double B, double &result_A, double &result_B) |
template<> | |
__hostanddev__ double | integralErfcGaussian< 3 > (double A, double B, double &result_A, double &result_B) |
template<> | |
__hostanddev__ double | integralErfcGaussian< 5 > (double A, double B, double &result_A, double &result_B) |
template<> | |
__hostanddev__ double | GGA_eval< GGA_X_wPBE_SR > (double rs, double sIn2, double &e_rs, double &e_sIn2) |
__hostanddev__ double | PW91_H0 (const double gamma, double beta, double g3, double t2, double ecUnif, double &H0_beta, double &H0_g3, double &H0_t2, double &H0_ecUnif) |
__hostanddev__ double | GGA_PBE_correlation (const double beta, const double beta_rs, double rs, double zeta, double g, double t2, double &e_rs, double &e_zeta, double &e_g, double &e_t2) |
template<> | |
__hostanddev__ double | GGA_eval< GGA_C_PBE > (double rs, double zeta, double g, double t2, double &e_rs, double &e_zeta, double &e_g, double &e_t2) |
PBE GGA correlation [JP Perdew, K Burke, and M Ernzerhof, Phys. Rev. Lett. 77, 3865 (1996)]. | |
template<> | |
__hostanddev__ double | GGA_eval< GGA_C_PBEsol > (double rs, double zeta, double g, double t2, double &e_rs, double &e_zeta, double &e_g, double &e_t2) |
PBEsol GGA correlation [JP Perdew et al, Phys. Rev. Lett. 100, 136406 (2008)]. | |
template<> | |
__hostanddev__ double | GGA_eval< GGA_C_PW91 > (double rs, double zeta, double g, double t2, double &e_rs, double &e_zeta, double &e_g, double &e_t2) |
PW91 GGA correlation [JP Perdew et al, Phys. Rev. B 46, 6671 (1992)]. | |
__hostanddev__ double | TFKinetic (double rs, double &e_rs) |
Thomas Fermi kinetic energy as a function of rs (PER PARTICLE): | |
template<> | |
__hostanddev__ double | GGA_eval< GGA_KE_VW > (double rs, double s2, double &e_rs, double &e_s2) |
von Weisacker gradient correction to Thomas Fermi LDA kinetic energy (with correct gradient expansion parameter lambda) | |
template<> | |
__hostanddev__ double | GGA_eval< GGA_KE_PW91 > (double rs, double s2, double &e_rs, double &e_s2) |
PW91k GGA kinetic energy [PRB 46, 6671-6687 (1992)] parameterized by Lembarki and Chermette [PRA 50, 5328-5331 (1994)]. | |
template<LDA_Variant variant> | |
__hostanddev__ double | LDA_eval (double rs, double zeta, double &e_rs, double &e_zeta) |
template<> | |
__hostanddev__ double | LDA_eval< LDA_C_PZ > (double rs, double zeta, double &e_rs, double &e_zeta) |
Perdew-Zunger correlation. | |
template<> | |
__hostanddev__ double | LDA_eval< LDA_C_PW > (double rs, double zeta, double &e_rs, double &e_zeta) |
Perdew-Wang correlation (original version, for numerical compatibility with LibXC's PW91) | |
template<> | |
__hostanddev__ double | LDA_eval< LDA_C_PW_prec > (double rs, double zeta, double &e_rs, double &e_zeta) |
Perdew-Wang correlation (extended precision version, for numerical compatibility with LibXC's PBE) | |
template<> | |
__hostanddev__ double | LDA_eval< LDA_C_VWN > (double rs, double zeta, double &e_rs, double &e_zeta) |
Vosko-Wilk-Nusair correlation. | |
template<> | |
__hostanddev__ double | LDA_eval< LDA_XC_Teter > (double rs, double zeta, double &e_rs, double &e_zeta) |
Teter LSD exchange & correlation [Phys. Rev. B 54, 1703 (1996)]. | |
template<mGGA_Variant variant> | |
__hostanddev__ double | mGGA_eval (double rs, double s2, double q, double z, double &e_rs, double &e_s2, double &e_q, double &e_z) |
template<mGGA_Variant variant> | |
__hostanddev__ double | mGGA_eval (double rs, double zeta, double g, double t2, double t2up, double t2dn, double zi2, double z, double &e_rs, double &e_zeta, double &e_g, double &e_t2, double &e_t2up, double &e_t2dn, double &e_zi2, double &e_z) |
template<bool revised> | |
__hostanddev__ double | mGGA_TPSS_Exchange (double rs, double s2, double q, double z, double &e_rs, double &e_s2, double &e_q, double &e_z) |
template<> | |
__hostanddev__ double | mGGA_eval< mGGA_X_TPSS > (double rs, double s2, double q, double z, double &e_rs, double &e_s2, double &e_q, double &e_z) |
TPSS Exchange: J.P. Perdew et al, Phys. Rev. Lett. 91, 146401 (2003) | |
template<> | |
__hostanddev__ double | mGGA_eval< mGGA_X_revTPSS > (double rs, double s2, double q, double z, double &e_rs, double &e_s2, double &e_q, double &e_z) |
revTPSS Exchange: J.P. Perdew et al, Phys. Rev. Lett. 103, 026403 (2009) | |
template<bool revised> | |
__hostanddev__ double | betaTPSS (double rs, double &beta_rs) |
Compute beta(rs) for the TPSS/revTPSS correlation functionals. | |
template<bool revised> | |
__hostanddev__ double | mGGA_TPSS_Correlation (double rs, double zeta, double g, double t2, double t2up, double t2dn, double zi2, double z, double &e_rs, double &e_zeta, double &e_g, double &e_t2, double &e_t2up, double &e_t2dn, double &e_zi2, double &e_z) |
template<> | |
__hostanddev__ double | mGGA_eval< mGGA_C_TPSS > (double rs, double zeta, double g, double t2, double t2up, double t2dn, double zi2, double z, double &e_rs, double &e_zeta, double &e_g, double &e_t2, double &e_t2up, double &e_t2dn, double &e_zi2, double &e_z) |
TPSS Correlation: J.P. Perdew et al, Phys. Rev. Lett. 91, 146401 (2003) | |
template<> | |
__hostanddev__ double | mGGA_eval< mGGA_C_revTPSS > (double rs, double zeta, double g, double t2, double t2up, double t2dn, double zi2, double z, double &e_rs, double &e_zeta, double &e_g, double &e_t2, double &e_t2up, double &e_t2dn, double &e_zi2, double &e_z) |
revTPSS Correlation: J.P. Perdew et al, Phys. Rev. Lett. 103, 026403 (2009) | |
#define SwitchTemplate_GGA | ( | variant, | |
nCount, | |||
fTemplate, | |||
argList | |||
) |
Switch a function fTemplate templated over GGA variant, spin scaling behavior and spin count, over all supported functionals with nCount being a compile-time constant NOTE: The second argument to fTemplate must correspond to the spin-scaling behavior of each functional (Used by the thread and gpu launchers of FunctionalGGA::evaluate) (This is needed to switch from a run-time variant to a compile-time template argument)
#define SwitchTemplate_LDA | ( | variant, | |
nCount, | |||
fTemplate, | |||
argList | |||
) |
Switch a function fTemplate templated over LDA variant and spin count, over all supported functionals with nCount being a compile-time constant (Used by the thread and gpu launchers of FunctionalLDA::evaluate) (This is needed to switch from a run-time variant to a compile-time template argument)
#define SwitchTemplate_mGGA | ( | variant, | |
nCount, | |||
fTemplate, | |||
argList | |||
) |
Switch a function fTemplate templated over mGGA variant, spin scaling behavior and spin count, over all supported functionals with nCount being a compile-time constant NOTE: The second argument to fTemplate must correspond to the spin-scaling behavior of each functional (Used by the thread and gpu launchers of FunctionalMGGA::evaluate) (This is needed to switch from a run-time variant to a compile-time template argument)
#define SwitchTemplate_spin | ( | SwitchTemplate_functional, | |
variant, | |||
nCount, | |||
fTemplate, | |||
argList | |||
) |
Switch a function fTemplate templated over a functional variant and spin count SwitchTemplate_functional is a macro such as SwitchTemplate_LDA (This is needed to switch from a run-time nCount to a compile-time template argument)
enum ExCorrType |
Types of exchange correlation functionals.
enum GGA_Variant |
Available GGA functionals.
enum KineticType |
enum LDA_Variant |
Available LDA functionals.
enum mGGA_Variant |
__hostanddev__ double GGA_eval | ( | double | rs, |
double | s2, | ||
double & | e_rs, | ||
double & | e_s2 | ||
) |
GGA interface inner layer for spin-scaling functionals (specialized for each such functional): Return energy density given rs and dimensionless gradient squared s2, and set gradients w.r.t rs and s2
__hostanddev__ double GGA_eval | ( | double | rs, |
double | zeta, | ||
double | g, | ||
double | t2, | ||
double & | e_rs, | ||
double & | e_zeta, | ||
double & | e_g, | ||
double & | e_t2 | ||
) |
GGA interface inner layer for functionals that do not spin-scale (specialized for each such functional): Return energy density given rs, zeta, g(zeta) and dimensionless gradient squared t2, and set gradients w.r.t rs, zeta, g(zeta) and t2 (see PW91 ref for definitions)
__hostanddev__ double GGA_eval< GGA_X_wPBE_SR > | ( | double | rs, |
double | sIn2, | ||
double & | e_rs, | ||
double & | e_sIn2 | ||
) |
Short-ranged omega-PBE GGA exchange - used in the HSE06 hybrid functional [J Heyd, G E Scuseria, and M Ernzerhof, J. Chem. Phys. 118, 3865 (2003)]
__hostanddev__ double GGA_PBE_correlation | ( | const double | beta, |
const double | beta_rs, | ||
double | rs, | ||
double | zeta, | ||
double | g, | ||
double | t2, | ||
double & | e_rs, | ||
double & | e_zeta, | ||
double & | e_g, | ||
double & | e_t2 | ||
) |
PBE GGA correlation [JP Perdew, K Burke, and M Ernzerhof, Phys. Rev. Lett. 77, 3865 (1996)] If beta depends on rs (as in revTPSS), beta_rs (=dbeta/drs) is propagated to e_rs
__hostanddev__ double GGA_PW91_Enhancement | ( | double | s2, |
double & | F_s2, | ||
const double | P, | ||
const double | Q, | ||
const double | R, | ||
const double | S, | ||
const double | T, | ||
const double | U | ||
) |
Functional form of the PW91 Exchange Enhancement factor (also used in some KE functionals) Implements equation (8) in [JP Perdew et al, Phys. Rev. B 46, 6671 (1992)] and its gradients P,Q,R,S,T,U are the parameters in order of appearance in that equation
__hostanddev__ double LDA_eval | ( | double | rs, |
double | zeta, | ||
double & | e_rs, | ||
double & | e_zeta | ||
) |
LDA interface inner layer (specialize for each functional): Return energy density given rs and zeta and set gradients w.r.t rs and zeta
__hostanddev__ double mGGA_eval | ( | double | rs, |
double | s2, | ||
double | q, | ||
double | z, | ||
double & | e_rs, | ||
double & | e_s2, | ||
double & | e_q, | ||
double & | e_z | ||
) |
GGA interface inner layer for spin-scaling functionals (specialized for each such functional): Return energy density given dimensionless quantities rs, s2, q and z, and set gradients w.r.t them See the PBE / TPSS refs for definitions of these quantities
__hostanddev__ double mGGA_eval | ( | double | rs, |
double | zeta, | ||
double | g, | ||
double | t2, | ||
double | t2up, | ||
double | t2dn, | ||
double | zi2, | ||
double | z, | ||
double & | e_rs, | ||
double & | e_zeta, | ||
double & | e_g, | ||
double & | e_t2, | ||
double & | e_t2up, | ||
double & | e_t2dn, | ||
double & | e_zi2, | ||
double & | e_z | ||
) |
GGA interface inner layer for functionals that do not spin-scale (specialized for each such functional): Return energy density given rs, zeta, g, t2 (see PW91 ref for definitions of these), t2up, t2dn (the individual spin versions of t2) zi2 (the dimensionless grad zeta squared term) and z = tauW/tau (totals, not spin resolved) and set gradients w.r.t them
__hostanddev__ double mGGA_TPSS_Correlation | ( | double | rs, |
double | zeta, | ||
double | g, | ||
double | t2, | ||
double | t2up, | ||
double | t2dn, | ||
double | zi2, | ||
double | z, | ||
double & | e_rs, | ||
double & | e_zeta, | ||
double & | e_g, | ||
double & | e_t2, | ||
double & | e_t2up, | ||
double & | e_t2dn, | ||
double & | e_zi2, | ||
double & | e_z | ||
) |
TPSS or revTPSS Correlation depending on revised = false/true J.P. Perdew et al, Phys. Rev. Lett. 91, 146401 (2003) [TPSS] J.P. Perdew et al, Phys. Rev. Lett. 103, 026403 (2009) [revTPSS]
__hostanddev__ double mGGA_TPSS_Exchange | ( | double | rs, |
double | s2, | ||
double | q, | ||
double | z, | ||
double & | e_rs, | ||
double & | e_s2, | ||
double & | e_q, | ||
double & | e_z | ||
) |
TPSS or revTPSS Exchange depending on revised = false/true J.P. Perdew et al, Phys. Rev. Lett. 91, 146401 (2003) [TPSS] J.P. Perdew et al, Phys. Rev. Lett. 103, 026403 (2009) [revTPSS]
__hostanddev__ double PW91_H0 | ( | const double | gamma, |
double | beta, | ||
double | g3, | ||
double | t2, | ||
double | ecUnif, | ||
double & | H0_beta, | ||
double & | H0_g3, | ||
double & | H0_t2, | ||
double & | H0_ecUnif | ||
) |
The H0 function (equations 13,14) of PW91 and its derivatives. Also the H fuunction (equations 7,8) of PBE. The notation is a mixture, picking the shortest of both references: using g from PW91 (phi in PBE) and gamma from PBE (beta^2/(2*alpha) in PW91).
__hostanddev__ double spinInterpolate | ( | double | rs, |
double | zeta, | ||
double & | e_rs, | ||
double & | e_zeta, | ||
const Para & | para, | ||
const Ferro & | ferro, | ||
const Stiff & | stiff, | ||
const double | fDblPrime0 = 4./(9*(pow(2., 1./3)-1)) |
||
) |
Spin-interpolate an LDA functional given its paramagnetic, ferromagnetic and spin-stiffness functors (This is the spin-inteprolation technique used in the VWN and PW correlation functionals) (For numerical compatibility with the original PW routine, the f"(0) scale factor may be over-ridden)