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>
|
| | KEDF_ExtWT () |
| |
| | ~KEDF_ExtWT () |
| |
| 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.
|
| |
|
| 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_)
|
| |
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
◆ KEDF_ExtWT()
| KEDF_ExtWT::KEDF_ExtWT |
( |
| ) |
|
|
inline |
◆ ~KEDF_ExtWT()
| KEDF_ExtWT::~KEDF_ExtWT |
( |
| ) |
|
|
inline |
◆ cal_kernel()
| void KEDF_ExtWT::cal_kernel |
( |
double |
tf_weight, |
|
|
double |
vw_weight, |
|
|
double |
rho0, |
|
|
ModulePW::PW_Basis * |
pw_rho |
|
) |
| |
◆ diff_linhard()
| double KEDF_ExtWT::diff_linhard |
( |
double |
eta, |
|
|
double |
vw_weight |
|
) |
| |
|
private |
The derivative of the WT kernel.
- Parameters
-
| eta | k / (2 * kF) |
| vw_weight | |
- Returns
- d W(eta)/d eta
◆ 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
-
| eta | k / (2 * kF) |
| tf_weight | |
| vw_weight | |
- Returns
- W(eta)
◆ extwt_potential()
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
-
| prho | charge density |
| pw_rho | pw basis |
| rpotential | rpotential => rpotential * 2 * phi + V_{extWT} * 2 * phi |
◆ 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_rho | pw_basis |
◆ get_energy()
Get the energy of ext-WT KEDF.
- Parameters
-
| prho | charge density |
| pw_rho | pw basis |
- Returns
- the energy of ext-WT KEDF
◆ 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
-
| prho | charge density |
| is | the index of spin |
| ir | the index of real space grid |
| pw_rho | pw basis |
- Returns
- the energy density of ext-WT KEDF
◆ 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
-
| prho | charge density |
| pw_rho | pw basis |
| vw_weight | the weight of vW KEDF |
◆ 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] | prho | charge density |
| [out] | rkernel_rho | \int{W(r-r')rho^{exponent}(r') dr'} |
| [in] | exponent | the exponent of rho |
| [in] | pw_rho | pw_basis |
◆ 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
-
| dV | the volume of one grid point in real space, omega/nxyz |
| alpha | |
| beta | |
| nelec | the number of electron |
| tf_weight | |
| vw_weight | |
| of_extwt_kappa | |
| pw_rho | pw_basis |
◆ 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
-
| prho | charge density |
| pw_rho | pw basis |
| rtau_extwt | rtau_extwt => rtau_extwt + tau_extwt |
◆ 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_rho | pw_basis |
◆ update_rho0()
◆ 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_
| double* KEDF_ExtWT::dkernel_deta_ = nullptr |
|
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_
| double* KEDF_ExtWT::kernel_ = nullptr |
|
private |
◆ kf_
| double KEDF_ExtWT::kf_ = 0. |
|
private |
◆ rho0_
| double KEDF_ExtWT::rho0_ = 0. |
◆ 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:
- /home/runner/work/abacus-develop/abacus-develop/source/source_pw/module_ofdft/kedf_extwt.h
- /home/runner/work/abacus-develop/abacus-develop/source/source_pw/module_ofdft/kedf_extwt.cpp