A class which calculates the kinetic energy, potential, and stress with Xie-Wang-Morales (XWM) KEDF. See Xu Q, Wang Y, Ma Y. Physical Review B, 2019, 100(20): 205132.
More...
#include <kedf_xwm.h>
|
| | KEDF_XWM () |
| |
| | ~KEDF_XWM () |
| |
| void | set_para (double dV, double rho_ref, double kappa, double nelec, double tf_weight, double vw_weight, ModulePW::PW_Basis *pw_rho) |
| | Set the parameters of XWM KEDF, and initialize kernel.
|
| |
| double | get_energy (const double *const *prho, ModulePW::PW_Basis *pw_rho) |
| | Get the energy of XWM KEDF.
|
| |
| double | get_energy_density (const double *const *prho, int is, int ir, ModulePW::PW_Basis *pw_rho) |
| | Get the energy density of XWM KEDF.
|
| |
| void | tau_xwm (const double *const *prho, ModulePW::PW_Basis *pw_rho, double *rtau_xwm) |
| | Get the kinetic energy of XWM KEDF, and add it onto rtau_xwm.
|
| |
| void | xwm_potential (const double *const *prho, ModulePW::PW_Basis *pw_rho, ModuleBase::matrix &rpotential) |
| | Get the potential of XWM KEDF, and add it into rpotential, and the XWM energy is stored in this->xwm_energy.
|
| |
| void | get_stress (const double *const *prho, ModulePW::PW_Basis *pw_rho, double vw_weight) |
| | Get the stress of XWM KEDF, and store it into this->stress.
|
| |
|
| 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 Xie-Wang-Morales (XWM) KEDF. See Xu Q, Wang Y, Ma Y. Physical Review B, 2019, 100(20): 205132.
- Author
- sunliang on 2025-01
◆ KEDF_XWM()
◆ ~KEDF_XWM()
◆ fill_kernel()
| void KEDF_XWM::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 XWM KEDF.
- Parameters
-
| prho | charge density |
| pw_rho | pw basis |
- Returns
- the energy of XWM KEDF
◆ get_energy_density()
| double KEDF_XWM::get_energy_density |
( |
const double *const * |
prho, |
|
|
int |
is, |
|
|
int |
ir, |
|
|
ModulePW::PW_Basis * |
pw_rho |
|
) |
| |
Get the energy density of XWM KEDF.
- Parameters
-
| prho | charge density |
| is | spin index |
| ir | grid index |
| pw_rho | pw basis |
- Returns
- the energy density of XWM KEDF
◆ get_stress()
| void KEDF_XWM::get_stress |
( |
const double *const * |
prho, |
|
|
ModulePW::PW_Basis * |
pw_rho, |
|
|
double |
vw_weight |
|
) |
| |
Get the stress of XWM 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_XWM::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 |
| [in] | kernel | W(r-r') |
| [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_XWM::set_para |
( |
double |
dV, |
|
|
double |
rho_ref, |
|
|
double |
kappa, |
|
|
double |
nelec, |
|
|
double |
tf_weight, |
|
|
double |
vw_weight, |
|
|
ModulePW::PW_Basis * |
pw_rho |
|
) |
| |
Set the parameters of XWM KEDF, and initialize kernel.
- Parameters
-
| dV | the volume of one grid point in real space, omega/nxyz |
| rho_ref | |
| kappa | |
| nelec | the number of electron |
| tf_weight | |
| vw_weight | |
| pw_rho | pw_basis |
◆ tau_xwm()
| void KEDF_XWM::tau_xwm |
( |
const double *const * |
prho, |
|
|
ModulePW::PW_Basis * |
pw_rho, |
|
|
double * |
rtau_xwm |
|
) |
| |
Get the kinetic energy of XWM KEDF, and add it onto rtau_xwm.
- Parameters
-
| prho | charge density |
| pw_rho | pw basis |
| rtau_xwm | rtau_xwm => rtau_xwm + tau_xwm |
◆ xwm_potential()
Get the potential of XWM KEDF, and add it into rpotential, and the XWM energy is stored in this->xwm_energy.
- Parameters
-
| prho | charge density |
| pw_rho | pw basis |
| rpotential | rpotential => rpotential + V_{XWM} |
◆ c_0
| double KEDF_XWM::c_0 = 0. |
|
private |
◆ c_1
| double KEDF_XWM::c_1 = 0. |
|
private |
◆ c_2
| double KEDF_XWM::c_2 = 0. |
|
private |
◆ c_kernel
| double KEDF_XWM::c_kernel = std::pow(ModuleBase::PI, 4./3.) / std::pow(3., 1. / 3.) * 2. |
|
private |
◆ dV_
| double KEDF_XWM::dV_ = 0. |
|
private |
◆ kappa_
| double KEDF_XWM::kappa_ = 0. |
|
private |
◆ kappa_11_6
| double KEDF_XWM::kappa_11_6 = 0. |
|
private |
◆ kappa_1_6
| double KEDF_XWM::kappa_1_6 = 0. |
|
private |
◆ kappa_5_6
| double KEDF_XWM::kappa_5_6 = 0. |
|
private |
◆ kernel1_
| std::vector<double> KEDF_XWM::kernel1_ = {} |
|
private |
◆ kernel2_
| std::vector<double> KEDF_XWM::kernel2_ = {} |
|
private |
◆ kf_
| double KEDF_XWM::kf_ = 0. |
|
private |
◆ rho0_
| double KEDF_XWM::rho0_ = 0. |
|
private |
◆ rho_ref_
| double KEDF_XWM::rho_ref_ = 0. |
|
private |
◆ stress
◆ tkf_
| double KEDF_XWM::tkf_ = 0. |
|
private |
◆ xwm_energy
| double KEDF_XWM::xwm_energy = 0. |
The documentation for this class was generated from the following files:
- /home/runner/work/abacus-develop/abacus-develop/source/source_pw/module_ofdft/kedf_xwm.h
- /home/runner/work/abacus-develop/abacus-develop/source/source_pw/module_ofdft/kedf_xwm.cpp