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

A class which calculates the kinetic energy, potential, and stress with Wang-Teter (WT) KEDF. See Wang L W, Teter M P. Physical Review B, 1992, 45(23): 13196. More...

#include <kedf_wt.h>

Collaboration diagram for KEDF_WT:

Public Member Functions

 KEDF_WT ()
 
 ~KEDF_WT ()
 
void set_para (double dV, double alpha, double beta, double nelec, double tf_weight, double vw_weight, double of_wt_rho0, bool of_hold_rho0, bool read_kernel, std::string kernel_file, ModulePW::PW_Basis *pw_rho)
 Set the parameters of WT KEDF, and initialize kernel.
 
double get_energy (const double *const *prho, ModulePW::PW_Basis *pw_rho)
 Get the energy of WT KEDF.
 
double get_energy_density (const double *const *prho, int is, int ir, ModulePW::PW_Basis *pw_rho)
 Get the energy density of LKT KEDF.
 
void tau_wt (const double *const *prho, ModulePW::PW_Basis *pw_rho, double *rtau_wt)
 Get the kinetic energy of WT KEDF, and add it onto rtau_wt.
 
void wt_potential (const double *const *prho, ModulePW::PW_Basis *pw_rho, ModuleBase::matrix &rpotential)
 Get the potential of WT KEDF, and add it into rpotential, and the WT energy will be calculated and stored in this->wt_energy.
 
void get_stress (const double *const *prho, ModulePW::PW_Basis *pw_rho, double vw_weight)
 Get the stress of WT KEDF, and store it into this->stress.
 

Public Attributes

double wt_energy = 0.
 
ModuleBase::matrix stress
 

Private Member Functions

double wt_kernel (double eta, double tf_weight, double vw_weight)
 Calculate the WT kernel according to Lindhard response function.
 
double diff_linhard (double eta, double vw_weight)
 The derivative of the WT kernel.
 
void multi_kernel (const double *const *prho, double **rkernel_rho, double exponent, ModulePW::PW_Basis *pw_rho)
 Calculate \int{W(r-r')rho^{exponent}(r') dr'}.
 
void read_kernel (std::string file_name, ModulePW::PW_Basis *pw_rho)
 Read the kernel from file.
 
void fill_kernel (double tf_weight, double vw_weight, ModulePW::PW_Basis *pw_rho)
 Fill the kernel (this->kernel_)
 

Private Attributes

double dV_ = 0.
 
double rho0_ = 0.
 
bool hold_rho0_ = false
 
double kf_ = 0.
 
double tkf_ = 0.
 
double alpha_ = 5. / 6.
 
double beta_ = 5. / 6.
 
const double c_tf_
 
double wt_coef_ = 0.
 
double * kernel_ = nullptr
 

Detailed Description

A class which calculates the kinetic energy, potential, and stress with Wang-Teter (WT) KEDF. See Wang L W, Teter M P. Physical Review B, 1992, 45(23): 13196.

Author
sunliang on 2022-06

Constructor & Destructor Documentation

◆ KEDF_WT()

KEDF_WT::KEDF_WT ( )
inline
Here is the call graph for this function:

◆ ~KEDF_WT()

KEDF_WT::~KEDF_WT ( )
inline

Member Function Documentation

◆ diff_linhard()

double KEDF_WT::diff_linhard ( double  eta,
double  vw_weight 
)
private

The derivative of the WT kernel.

Parameters
etak / (2 * kF)
vw_weight
Returns
d W(eta)/d eta
Here is the caller graph for this function:

◆ fill_kernel()

void KEDF_WT::fill_kernel ( double  tf_weight,
double  vw_weight,
ModulePW::PW_Basis pw_rho 
)
private

Fill the kernel (this->kernel_)

Parameters
tf_weight
vw_weight
pw_rhopw_basis
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_energy()

double KEDF_WT::get_energy ( const double *const *  prho,
ModulePW::PW_Basis pw_rho 
)

Get the energy of WT KEDF.

\[ E_{WT} = c_{TF} * \int{\rho^\alpha * W(r - r') * \rho^\beta drdr'} \]

Parameters
prhocharge density
pw_rhopw basis
Returns
the energy of WT KEDF
Here is the call graph for this function:

◆ get_energy_density()

double KEDF_WT::get_energy_density ( const double *const *  prho,
int  is,
int  ir,
ModulePW::PW_Basis pw_rho 
)

Get the energy density of LKT KEDF.

\[ \tau_{WT} = c_{TF} * \rho^\alpha * \int{W(r - r') * \rho^\beta dr'} \]

Parameters
prhocharge density
isthe index of spin
irthe index of real space grid
pw_rhopw basis
Returns
the energy density of WT KEDF
Here is the call graph for this function:

◆ get_stress()

void KEDF_WT::get_stress ( const double *const *  prho,
ModulePW::PW_Basis pw_rho,
double  vw_weight 
)

Get the stress of WT KEDF, and store it into this->stress.

Parameters
prhocharge density
pw_rhopw basis
vw_weightthe weight of vW KEDF
Here is the call graph for this function:
Here is the caller graph for this function:

◆ multi_kernel()

void KEDF_WT::multi_kernel ( const double *const *  prho,
double **  rkernel_rho,
double  exponent,
ModulePW::PW_Basis pw_rho 
)
private

Calculate \int{W(r-r')rho^{exponent}(r') dr'}.

Parameters
[in]prhocharge density
[out]rkernel_rho\int{W(r-r')rho^{exponent}(r') dr'}
[in]exponentthe exponent of rho
[in]pw_rhopw_basis
Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_kernel()

void KEDF_WT::read_kernel ( std::string  file_name,
ModulePW::PW_Basis pw_rho 
)
private

Read the kernel from file.

Parameters
file_namethe name of the kernel file
pw_rhopw basis
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_para()

void KEDF_WT::set_para ( double  dV,
double  alpha,
double  beta,
double  nelec,
double  tf_weight,
double  vw_weight,
double  of_wt_rho0,
bool  of_hold_rho0,
bool  read_kernel,
std::string  kernel_file,
ModulePW::PW_Basis pw_rho 
)

Set the parameters of WT KEDF, and initialize kernel.

Parameters
dVthe volume of one grid point in real space, omega/nxyz
alpha
beta
nelecthe number of electron
tf_weight
vw_weight
of_wt_rho0
of_hold_rho0
read_kernel
kernel_file
pw_rhopw_basis
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tau_wt()

void KEDF_WT::tau_wt ( const double *const *  prho,
ModulePW::PW_Basis pw_rho,
double *  rtau_wt 
)

Get the kinetic energy of WT KEDF, and add it onto rtau_wt.

\[ \tau_{WT} = c_{TF} * \rho^\alpha * \int{W(r - r') * \rho^\beta dr'} \]

Parameters
prhocharge density
pw_rhopw basis
rtau_wtrtau_wt => rtau_wt + tau_wt
Here is the call graph for this function:
Here is the caller graph for this function:

◆ wt_kernel()

double KEDF_WT::wt_kernel ( double  eta,
double  tf_weight,
double  vw_weight 
)
private

Calculate the WT kernel according to Lindhard response function.

Parameters
etak / (2 * kF)
tf_weight
vw_weight
Returns
W(eta)
Here is the caller graph for this function:

◆ wt_potential()

void KEDF_WT::wt_potential ( const double *const *  prho,
ModulePW::PW_Basis pw_rho,
ModuleBase::matrix rpotential 
)

Get the potential of WT KEDF, and add it into rpotential, and the WT energy will be calculated and stored in this->wt_energy.

\[ V_{WT} = c_{TF} * [\alpha \rho^{\alpha-1} \int{W(r - r')\rho^{\beta}(r') dr'} + \beta \rho^{\beta-1} \int{W(r' -
r)\rho^{\alpha}(r') dr'}] \]

Parameters
prhocharge density
pw_rhopw basis
rpotentialrpotential => rpotential + V_{WT}
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ alpha_

double KEDF_WT::alpha_ = 5. / 6.
private

◆ beta_

double KEDF_WT::beta_ = 5. / 6.
private

◆ c_tf_

const double KEDF_WT::c_tf_
private
Initial value:
= 3.0 / 10.0 * std::pow(3 * std::pow(M_PI, 2.0), 2.0 / 3.0)
* 2

◆ dV_

double KEDF_WT::dV_ = 0.
private

◆ hold_rho0_

bool KEDF_WT::hold_rho0_ = false
private

◆ kernel_

double* KEDF_WT::kernel_ = nullptr
private

◆ kf_

double KEDF_WT::kf_ = 0.
private

◆ rho0_

double KEDF_WT::rho0_ = 0.
private

◆ stress

ModuleBase::matrix KEDF_WT::stress

◆ tkf_

double KEDF_WT::tkf_ = 0.
private

◆ wt_coef_

double KEDF_WT::wt_coef_ = 0.
private

◆ wt_energy

double KEDF_WT::wt_energy = 0.

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