ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
KEDF_ExtWT Class Reference

A class which calculates the kinetic energy, potential, and stress with extended Wang-Teter (ext-WT) KEDF. See Sun L, Chen M. Physical Review B, 2026, 113(16): L161107. More...

#include <kedf_extwt.h>

Collaboration diagram for KEDF_ExtWT:

Public Member Functions

 KEDF_ExtWT ()
 ~KEDF_ExtWT ()=default
void set_para (double dV, double alpha, double beta, double nelec, double tf_weight, double vw_weight, double of_extwt_kappa, ModulePW::PW_Basis *pw_rho)
 Set the parameters of ext-WT KEDF, and initialize kernel.
void update_rho0 (const double *const *prho, ModulePW::PW_Basis *pw_rho)
void cal_kernel (double tf_weight, double vw_weight, double rho0, ModulePW::PW_Basis *pw_rho)
void update_dkernel_deta (const double &vw_weight, ModulePW::PW_Basis *pw_rho)
 Fill the dkernel_deta (this->dkernel_deta_).
double get_energy (const double *const *prho, ModulePW::PW_Basis *pw_rho)
 Get the energy of ext-WT KEDF.
double get_energy_density (const double *const *prho, int is, int ir, ModulePW::PW_Basis *pw_rho)
 Get the energy density of ext-WT KEDF.
void tau_extwt (const double *const *prho, ModulePW::PW_Basis *pw_rho, double *rtau_extwt)
 Get the kinetic energy of ext-WT KEDF, and add it onto rtau_extwt.
void extwt_potential (const double *const *prho, ModulePW::PW_Basis *pw_rho, ModuleBase::matrix &rpotential)
 Get the potential of ext-WT KEDF, and add it into rpotential, and the ext-WT energy will be calculated and stored in this->extwt_energy r)\rho^{\alpha}(r') dr'}] \f].
void get_stress (const double *const *prho, ModulePW::PW_Basis *pw_rho, double vw_weight)
 Get the stress of ext-WT KEDF, and store it into this->stress.

Public Attributes

double extwt_energy = 0.
ModuleBase::matrix stress
double rho0_ = 0.

Private Member Functions

double extwt_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, const double *kernel, double **rkernel_rho, double exponent, ModulePW::PW_Basis *pw_rho)
 Calculate \int{W(r-r')rho^{exponent}(r') dr'}.
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 kf_ = 0.
double tkf_ = 0.
double alpha_ = 5. / 6.
double beta_ = 5. / 6.
const double c_tf_
double wt_coef_ = 0.
std::vector< double > kernel_
std::vector< double > dkernel_deta_
double sum_rho_kappa_ = 0.
double sum_rho_kappa_plus_one_ = 0.
double kappa_ = 1.0 / (2.0 * std::pow(4./3., 1./3.) - 1.0)

Detailed Description

A class which calculates the kinetic energy, potential, and stress with extended Wang-Teter (ext-WT) KEDF. See Sun L, Chen M. Physical Review B, 2026, 113(16): L161107.

Author
sunliang on 2026-04

Constructor & Destructor Documentation

◆ KEDF_ExtWT()

KEDF_ExtWT::KEDF_ExtWT ( )
inline

◆ ~KEDF_ExtWT()

KEDF_ExtWT::~KEDF_ExtWT ( )
default

Member Function Documentation

◆ cal_kernel()

void KEDF_ExtWT::cal_kernel ( double tf_weight,
double vw_weight,
double rho0,
ModulePW::PW_Basis * pw_rho )
Here is the call graph for this function:

◆ diff_linhard()

double KEDF_ExtWT::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:

◆ extwt_kernel()

double KEDF_ExtWT::extwt_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:

◆ extwt_potential()

void KEDF_ExtWT::extwt_potential ( const double *const * prho,
ModulePW::PW_Basis * pw_rho,
ModuleBase::matrix & rpotential )

Get the potential of ext-WT KEDF, and add it into rpotential, and the ext-WT energy will be calculated and stored in this->extwt_energy r)\rho^{\alpha}(r') dr'}] \f].

Parameters
prhocharge density
pw_rhopw basis
rpotentialrpotential => rpotential * 2 * phi + V_{extWT} * 2 * phi
Here is the call graph for this function:

◆ fill_kernel()

void KEDF_ExtWT::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_ExtWT::get_energy ( const double *const * prho,
ModulePW::PW_Basis * pw_rho )

Get the energy of ext-WT KEDF.

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

◆ get_energy_density()

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

Get the energy density of ext-WT KEDF.

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

◆ get_stress()

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

Get the stress of ext-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:

◆ multi_kernel()

void KEDF_ExtWT::multi_kernel ( const double *const * prho,
const double * kernel,
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:

◆ set_para()

void KEDF_ExtWT::set_para ( double dV,
double alpha,
double beta,
double nelec,
double tf_weight,
double vw_weight,
double of_extwt_kappa,
ModulePW::PW_Basis * pw_rho )

Set the parameters of ext-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_extwt_kappa
pw_rhopw_basis
Here is the call graph for this function:

◆ tau_extwt()

void KEDF_ExtWT::tau_extwt ( const double *const * prho,
ModulePW::PW_Basis * pw_rho,
double * rtau_extwt )

Get the kinetic energy of ext-WT KEDF, and add it onto rtau_extwt.

Parameters
prhocharge density
pw_rhopw basis
rtau_extwtrtau_extwt => rtau_extwt + tau_extwt
Here is the call graph for this function:

◆ update_dkernel_deta()

void KEDF_ExtWT::update_dkernel_deta ( const double & vw_weight,
ModulePW::PW_Basis * pw_rho )

Fill the dkernel_deta (this->dkernel_deta_).

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

◆ update_rho0()

void KEDF_ExtWT::update_rho0 ( const double *const * prho,
ModulePW::PW_Basis * pw_rho )
Here is the call graph for this function:

Member Data Documentation

◆ alpha_

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

◆ beta_

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

◆ c_tf_

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

◆ dkernel_deta_

std::vector<double> KEDF_ExtWT::dkernel_deta_
private

◆ dV_

double KEDF_ExtWT::dV_ = 0.
private

◆ extwt_energy

double KEDF_ExtWT::extwt_energy = 0.

◆ kappa_

double KEDF_ExtWT::kappa_ = 1.0 / (2.0 * std::pow(4./3., 1./3.) - 1.0)
private

◆ kernel_

std::vector<double> KEDF_ExtWT::kernel_
private

◆ kf_

double KEDF_ExtWT::kf_ = 0.
private

◆ rho0_

double KEDF_ExtWT::rho0_ = 0.

◆ stress

ModuleBase::matrix KEDF_ExtWT::stress

◆ sum_rho_kappa_

double KEDF_ExtWT::sum_rho_kappa_ = 0.
private

◆ sum_rho_kappa_plus_one_

double KEDF_ExtWT::sum_rho_kappa_plus_one_ = 0.
private

◆ tkf_

double KEDF_ExtWT::tkf_ = 0.
private

◆ wt_coef_

double KEDF_ExtWT::wt_coef_ = 0.
private

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