ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Private Attributes | List of all members
XC_Functional Class Reference

#include <xc_functional.h>

Collaboration diagram for XC_Functional:

Public Member Functions

 XC_Functional ()
 
 ~XC_Functional ()
 

Static Public Member Functions

static std::tuple< double, double, ModuleBase::matrixv_xc (const int &nrxx, const Charge *const chr, const UnitCell *ucell)
 
static int get_func_type ()
 
static void set_xc_type (const std::string xc_func_in)
 
static void set_hybrid_alpha (const double alpha_in)
 
static double get_hybrid_alpha ()
 
static bool get_ked_flag ()
 
static void set_xc_first_loop (const UnitCell &ucell)
 Usually in exx caculation, the first SCF loop should be converged with PBE.
 
static std::vector< int > get_func_id ()
 
static void xc (const double &rho, double &exc, double &vxc)
 
static void xc_spin (const double &rho, const double &zeta, double &exc, double &vxcup, double &vxcdw)
 
static void gcxc (const double &rho, const double &grho, double &sxc, double &v1xc, double &v2xc)
 
static void gcx_spin (double rhoup, double rhodw, double grhoup2, double grhodw2, double &sx, double &v1xup, double &v1xdw, double &v2xup, double &v2xdw)
 
static void gcc_spin (double rho, double &zeta, double grho, double &sc, double &v1cup, double &v1cdw, double &v2c)
 
static void gradcorr (double &etxc, double &vtxc, ModuleBase::matrix &v, const Charge *const chr, ModulePW::PW_Basis *rhopw, const UnitCell *ucell, std::vector< double > &stress_gga, const bool is_stress=false)
 
template<typename T , typename Device , typename Real = typename GetTypeReal<T>::type>
static void grad_wfc (const int ik, const Real tpiba, const ModulePW::PW_Basis_K *wfc_basis, const T *rhog, T *grad)
 
static void grad_rho (const std::complex< double > *rhog, ModuleBase::Vector3< double > *gdr, const ModulePW::PW_Basis *rho_basis, const double tpiba)
 
static void grad_dot (const ModuleBase::Vector3< double > *h, double *dh, const ModulePW::PW_Basis *rho_basis, const double tpiba)
 
static void noncolin_rho (double *rhoout1, double *rhoout2, double *seg, const double *const *const rho, const int nrxx, const double *ux_, const bool lsign_)
 
static void slater (const double &rs, double &ex, double &vx)
 
static void slater1 (const double &rs, double &ex, double &vx)
 
static void slater_rxc (const double &rs, double &ex, double &vx)
 
static void slater_spin (const double &rho, const double &zeta, double &ex, double &vxup, double &vxdw)
 
static void slater1_spin (const double &rho, const double &zeta, double &ex, double &vxup, double &vxdw)
 
static void slater_rxc_spin (const double &rho, const double &z, double &ex, double &vxup, double &vxdw)
 
static void pw (const double &rs, const int &iflag, double &ec, double &vc)
 
static void pz (const double &rs, const int &iflag, double &ec, double &vc)
 
static void lyp (const double &rs, double &ec, double &vc)
 
static void vwn (const double &rs, double &ec, double &vc)
 
static void wigner (const double &rs, double &ec, double &vc)
 
static void hl (const double &rs, double &ec, double &vc)
 
static void gl (const double &rs, double &ec, double &vc)
 
static void pw_spin (const double &rs, const double &zeta, double &ec, double &vcup, double &vcdw)
 
static void pz_spin (const double &rs, const double &zeta, double &ec, double &vcup, double &vcdw)
 
static void pz_polarized (const double &rs, double &ec, double &vc)
 
static void becke88 (const double &rho, const double &grho, double &sx, double &v1x, double &v2x)
 
static void ggax (const double &rho, const double &grho, double &sx, double &v1x, double &v2x)
 
static void pbex (const double &rho, const double &grho, const int &iflag, double &sx, double &v1x, double &v2x)
 
static void optx (const double rho, const double grho, double &sx, double &v1x, double &v2x)
 
static void wcx (const double &rho, const double &grho, double &sx, double &v1x, double &v2x)
 
static void becke88_spin (double rho, double grho, double &sx, double &v1x, double &v2x)
 
static void perdew86 (const double rho, const double grho, double &sc, double &v1c, double &v2c)
 
static void ggac (const double &rho, const double &grho, double &sc, double &v1c, double &v2c)
 
static void pbec (const double &rho, const double &grho, const int &flag, double &sc, double &v1c, double &v2c)
 
static void glyp (const double &rho, const double &grho, double &sc, double &v1c, double &v2c)
 
static void perdew86_spin (double rho, double zeta, double grho, double &sc, double &v1cup, double &v1cdw, double &v2c)
 
static void pbec_spin (double rho, double zeta, double grho, const int &flag, double &sc, double &v1cup, double &v1cdw, double &v2c)
 
static void hcth (const double rho, const double grho, double &sx, double &v1x, double &v2x)
 
static void pwcorr (const double r, const double c[], double &g, double &dg)
 

Static Private Attributes

static std::vector< int > func_id
 
static int func_type = 1
 
static bool ked_flag = false
 
static bool use_libxc = true
 
static double hybrid_alpha = 0.25
 
static std::map< int, double > scaling_factor_xc = { {1, 1.0} }
 

Constructor & Destructor Documentation

◆ XC_Functional()

XC_Functional::XC_Functional ( )

◆ ~XC_Functional()

XC_Functional::~XC_Functional ( )

Member Function Documentation

◆ becke88()

void XC_Functional::becke88 ( const double &  rho,
const double &  grho,
double &  sx,
double &  v1x,
double &  v2x 
)
static
Here is the caller graph for this function:

◆ becke88_spin()

void XC_Functional::becke88_spin ( double  rho,
double  grho,
double &  sx,
double &  v1x,
double &  v2x 
)
static
Here is the caller graph for this function:

◆ gcc_spin()

void XC_Functional::gcc_spin ( double  rho,
double &  zeta,
double  grho,
double &  sc,
double &  v1cup,
double &  v1cdw,
double &  v2c 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gcx_spin()

void XC_Functional::gcx_spin ( double  rhoup,
double  rhodw,
double  grhoup2,
double  grhodw2,
double &  sx,
double &  v1xup,
double &  v1xdw,
double &  v2xup,
double &  v2xdw 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gcxc()

void XC_Functional::gcxc ( const double &  rho,
const double &  grho,
double &  sxc,
double &  v1xc,
double &  v2xc 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_func_id()

static std::vector< int > XC_Functional::get_func_id ( )
inlinestatic
Here is the caller graph for this function:

◆ get_func_type()

static int XC_Functional::get_func_type ( )
inlinestatic
Here is the caller graph for this function:

◆ get_hybrid_alpha()

static double XC_Functional::get_hybrid_alpha ( )
inlinestatic

◆ get_ked_flag()

static bool XC_Functional::get_ked_flag ( )
inlinestatic
Here is the caller graph for this function:

◆ ggac()

void XC_Functional::ggac ( const double &  rho,
const double &  grho,
double &  sc,
double &  v1c,
double &  v2c 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ggax()

void XC_Functional::ggax ( const double &  rho,
const double &  grho,
double &  sx,
double &  v1x,
double &  v2x 
)
static
Here is the caller graph for this function:

◆ gl()

void XC_Functional::gl ( const double &  rs,
double &  ec,
double &  vc 
)
static
Here is the caller graph for this function:

◆ glyp()

void XC_Functional::glyp ( const double &  rho,
const double &  grho,
double &  sc,
double &  v1c,
double &  v2c 
)
static
Here is the caller graph for this function:

◆ grad_dot()

void XC_Functional::grad_dot ( const ModuleBase::Vector3< double > *  h,
double *  dh,
const ModulePW::PW_Basis rho_basis,
const double  tpiba 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ grad_rho()

void XC_Functional::grad_rho ( const std::complex< double > *  rhog,
ModuleBase::Vector3< double > *  gdr,
const ModulePW::PW_Basis rho_basis,
const double  tpiba 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ grad_wfc()

template<typename T , typename Device , typename Real >
template void XC_Functional::grad_wfc< std::complex< double >, base_device::DEVICE_CPU, double > ( const int  ik,
const Real  tpiba,
const ModulePW::PW_Basis_K wfc_basis,
const T rhog,
T grad 
)
static
Here is the call graph for this function:

◆ gradcorr()

void XC_Functional::gradcorr ( double &  etxc,
double &  vtxc,
ModuleBase::matrix v,
const Charge *const  chr,
ModulePW::PW_Basis rhopw,
const UnitCell ucell,
std::vector< double > &  stress_gga,
const bool  is_stress = false 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hcth()

void XC_Functional::hcth ( const double  rho,
const double  grho,
double &  sx,
double &  v1x,
double &  v2x 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hl()

void XC_Functional::hl ( const double &  rs,
double &  ec,
double &  vc 
)
static
Here is the caller graph for this function:

◆ lyp()

void XC_Functional::lyp ( const double &  rs,
double &  ec,
double &  vc 
)
static
Here is the caller graph for this function:

◆ noncolin_rho()

void XC_Functional::noncolin_rho ( double *  rhoout1,
double *  rhoout2,
double *  seg,
const double *const *const  rho,
const int  nrxx,
const double *  ux_,
const bool  lsign_ 
)
static
Here is the caller graph for this function:

◆ optx()

void XC_Functional::optx ( const double  rho,
const double  grho,
double &  sx,
double &  v1x,
double &  v2x 
)
static
Here is the caller graph for this function:

◆ pbec()

void XC_Functional::pbec ( const double &  rho,
const double &  grho,
const int &  flag,
double &  sc,
double &  v1c,
double &  v2c 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pbec_spin()

void XC_Functional::pbec_spin ( double  rho,
double  zeta,
double  grho,
const int &  flag,
double &  sc,
double &  v1cup,
double &  v1cdw,
double &  v2c 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ pbex()

void XC_Functional::pbex ( const double &  rho,
const double &  grho,
const int &  iflag,
double &  sx,
double &  v1x,
double &  v2x 
)
static
Here is the caller graph for this function:

◆ perdew86()

void XC_Functional::perdew86 ( const double  rho,
const double  grho,
double &  sc,
double &  v1c,
double &  v2c 
)
static
Here is the caller graph for this function:

◆ perdew86_spin()

void XC_Functional::perdew86_spin ( double  rho,
double  zeta,
double  grho,
double &  sc,
double &  v1cup,
double &  v1cdw,
double &  v2c 
)
static
Here is the caller graph for this function:

◆ pw()

void XC_Functional::pw ( const double &  rs,
const int &  iflag,
double &  ec,
double &  vc 
)
static
Here is the caller graph for this function:

◆ pw_spin()

void XC_Functional::pw_spin ( const double &  rs,
const double &  zeta,
double &  ec,
double &  vcup,
double &  vcdw 
)
static
Here is the caller graph for this function:

◆ pwcorr()

void XC_Functional::pwcorr ( const double  r,
const double  c[],
double &  g,
double &  dg 
)
static
Here is the caller graph for this function:

◆ pz()

void XC_Functional::pz ( const double &  rs,
const int &  iflag,
double &  ec,
double &  vc 
)
static
Here is the caller graph for this function:

◆ pz_polarized()

void XC_Functional::pz_polarized ( const double &  rs,
double &  ec,
double &  vc 
)
static
Here is the caller graph for this function:

◆ pz_spin()

void XC_Functional::pz_spin ( const double &  rs,
const double &  zeta,
double &  ec,
double &  vcup,
double &  vcdw 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_hybrid_alpha()

void XC_Functional::set_hybrid_alpha ( const double  alpha_in)
static
Here is the caller graph for this function:

◆ set_xc_first_loop()

void XC_Functional::set_xc_first_loop ( const UnitCell ucell)
static

Usually in exx caculation, the first SCF loop should be converged with PBE.

In the special "two-level" calculation case, the first scf iteration only calculate the functional without exact exchange. but in "nscf" calculation, there is no need of "two-level" method.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_xc_type()

void XC_Functional::set_xc_type ( const std::string  xc_func_in)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ slater()

void XC_Functional::slater ( const double &  rs,
double &  ex,
double &  vx 
)
static
Here is the caller graph for this function:

◆ slater1()

void XC_Functional::slater1 ( const double &  rs,
double &  ex,
double &  vx 
)
static
Here is the caller graph for this function:

◆ slater1_spin()

void XC_Functional::slater1_spin ( const double &  rho,
const double &  zeta,
double &  ex,
double &  vxup,
double &  vxdw 
)
static
Here is the caller graph for this function:

◆ slater_rxc()

void XC_Functional::slater_rxc ( const double &  rs,
double &  ex,
double &  vx 
)
static
Here is the caller graph for this function:

◆ slater_rxc_spin()

void XC_Functional::slater_rxc_spin ( const double &  rho,
const double &  z,
double &  ex,
double &  vxup,
double &  vxdw 
)
static
Here is the caller graph for this function:

◆ slater_spin()

void XC_Functional::slater_spin ( const double &  rho,
const double &  zeta,
double &  ex,
double &  vxup,
double &  vxdw 
)
static
Here is the caller graph for this function:

◆ v_xc()

std::tuple< double, double, ModuleBase::matrix > XC_Functional::v_xc ( const int &  nrxx,
const Charge *const  chr,
const UnitCell ucell 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vwn()

void XC_Functional::vwn ( const double &  rs,
double &  ec,
double &  vc 
)
static
Here is the caller graph for this function:

◆ wcx()

void XC_Functional::wcx ( const double &  rho,
const double &  grho,
double &  sx,
double &  v1x,
double &  v2x 
)
static
Here is the caller graph for this function:

◆ wigner()

void XC_Functional::wigner ( const double &  rs,
double &  ec,
double &  vc 
)
static
Here is the caller graph for this function:

◆ xc()

void XC_Functional::xc ( const double &  rho,
double &  exc,
double &  vxc 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xc_spin()

void XC_Functional::xc_spin ( const double &  rho,
const double &  zeta,
double &  exc,
double &  vxcup,
double &  vxcdw 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ func_id

std::vector< int > XC_Functional::func_id
staticprivate

◆ func_type

int XC_Functional::func_type = 1
staticprivate

◆ hybrid_alpha

double XC_Functional::hybrid_alpha = 0.25
staticprivate

◆ ked_flag

bool XC_Functional::ked_flag = false
staticprivate

◆ scaling_factor_xc

std::map< int, double > XC_Functional::scaling_factor_xc = { {1, 1.0} }
staticprivate

◆ use_libxc

bool XC_Functional::use_libxc = true
staticprivate

The documentation for this class was generated from the following files: