ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
#include <elecstate_pw.h>
Public Member Functions | |
ElecStatePW (ModulePW::PW_Basis_K *wfc_basis_in, Charge *chg_in, K_Vectors *pkv_in, UnitCell *ucell_in, pseudopot_cell_vnl *ppcell_in, ModulePW::PW_Basis *rhodpw_in, ModulePW::PW_Basis *rhopw_in, ModulePW::PW_Basis_Big *bigpw_in) | |
~ElecStatePW () | |
virtual void | psiToRho (const psi::Psi< T, Device > &psi) |
interface for HSolver to calculate rho from Psi | |
virtual void | cal_tau (const psi::Psi< T, Device > &psi) |
void | cal_becsum (const psi::Psi< T, Device > &psi) |
calculate becsum for uspp | |
void | init_rho_data () |
init rho_data and kin_r_data | |
void | init_rho_data () |
![]() | |
ElecState () | |
ElecState (Charge *charge_in, ModulePW::PW_Basis *rhopw_in, ModulePW::PW_Basis_Big *bigpw_in) | |
virtual | ~ElecState () |
void | init_ks (Charge *chg_in, const K_Vectors *klist_in, int nk_in, ModulePW::PW_Basis *rhopw_in, const ModulePW::PW_Basis_Big *bigpw_in) |
virtual const double * | getRho (int spin) const |
virtual void | psiToRho (const psi::Psi< std::complex< double > > &psi) |
virtual void | psiToRho (const psi::Psi< double > &psi) |
virtual void | cal_tau (const psi::Psi< std::complex< double > > &psi) |
virtual void | cal_tau (const psi::Psi< double > &psi) |
virtual void | cal_tau (const psi::Psi< std::complex< float > > &psi) |
virtual void | getNewRho () |
void | init_nelec_spin () |
virtual void | print_psi (const psi::Psi< double > &psi_in, const int istep=-1) |
virtual void | print_psi (const psi::Psi< std::complex< double > > &psi_in, const int istep=-1) |
void | init_scf (const int istep, const UnitCell &ucell, const Parallel_Grid &pgrid, const ModuleBase::ComplexMatrix &strucfac, const bool *numeric, ModuleSymmetry::Symmetry &symm, const void *wfcpw=nullptr) |
Init rho_core, init rho, renormalize rho, init pot. | |
void | cal_bandgap () |
calculate band gap | |
void | cal_bandgap_updw () |
calculate spin up & down band gap | |
double | cal_delta_eband (const UnitCell &ucell) const |
calculate deband | |
double | cal_delta_escf () const |
calculate descf | |
void | cal_converged () |
calculation if converged | |
void | cal_energies (const int type) |
calculate energies | |
void | set_exx (const double &Eexx) |
calculation if converged | |
void | set_exx (const std::complex< double > &Eexx) |
double | get_hartree_energy () |
double | get_etot_efield () |
double | get_etot_gatefield () |
double | get_solvent_model_Ael () |
double | get_solvent_model_Acav () |
virtual double | get_spin_constrain_energy () |
double | get_dftu_energy () |
double | get_local_pp_energy () |
Public Attributes | |
Real * | becsum = nullptr |
Real ** | rho = nullptr |
T ** | rhog = nullptr |
Real ** | kin_r = nullptr |
ModulePW::PW_Basis_K * | basis = nullptr |
![]() | |
std::vector< double > | nelec_spin |
std::string | classname = "elecstate" |
int | iter = 0 |
scf iteration | |
double | omega = 0.0 |
volume | |
Potential * | pot = nullptr |
pointer to potential | |
Charge * | charge = nullptr |
pointer to charge density | |
const K_Vectors * | klist = nullptr |
pointer to k points lists | |
const ModulePW::PW_Basis_Big * | bigpw = nullptr |
bigpw will be removed later | |
ModuleBase::matrix | vnew |
bool | vnew_exist = false |
fenergy | f_en |
energies contribute to the total free energy | |
efermi | eferm |
fermi energies | |
double | bandgap = 0.0 |
bandgap = E_{lumo} - E_{homo} | |
double | bandgap_up = 0.0 |
spin up bandgap | |
double | bandgap_dw = 0.0 |
spin down bandgap | |
ModuleBase::matrix | ekb |
band energy at each k point, each band. | |
ModuleBase::matrix | wg |
occupation weight for each k-point and band | |
bool | skip_weights = false |
Protected Member Functions | |
void | updateRhoK (const psi::Psi< T, Device > &psi) |
void | parallelK () |
sum over all pools for rho and ebands | |
void | rhoBandK (const psi::Psi< T, Device > &psi) |
calcualte rho for each k | |
void | add_usrho (const psi::Psi< T, Device > &psi) |
add to the charge density in reciprocal space the part which is due to the US augmentation. | |
void | addusdens_g (const Real *becsum, T **rhog) |
Protected Attributes | |
ModulePW::PW_Basis * | rhopw_smooth = nullptr |
UnitCell * | ucell = nullptr |
const pseudopot_cell_vnl * | ppcell = nullptr |
Device * | ctx = {} |
bool | init_rho = false |
T * | vkb = nullptr |
Real * | rho_data = nullptr |
T * | rhog_data = nullptr |
Real * | kin_r_data = nullptr |
T * | wfcr = nullptr |
T * | wfcr_another_spin = nullptr |
Private Types | |
using | Real = typename GetTypeReal< T >::type |
using | meta_op = hamilt::meta_pw_op< Real, Device > |
using | elecstate_pw_op = elecstate::elecstate_pw_op< Real, Device > |
using | setmem_var_op = base_device::memory::set_memory_op< Real, Device > |
using | resmem_var_op = base_device::memory::resize_memory_op< Real, Device > |
using | delmem_var_op = base_device::memory::delete_memory_op< Real, Device > |
using | castmem_var_d2h_op = base_device::memory::cast_memory_op< double, Real, base_device::DEVICE_CPU, Device > |
using | setmem_complex_op = base_device::memory::set_memory_op< T, Device > |
using | resmem_complex_op = base_device::memory::resize_memory_op< T, Device > |
using | delmem_complex_op = base_device::memory::delete_memory_op< T, Device > |
using | gemv_op = ModuleBase::gemv_op< T, Device > |
using | gemm_op = ModuleBase::gemm_op< T, Device > |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
elecstate::ElecStatePW< T, Device >::ElecStatePW | ( | ModulePW::PW_Basis_K * | wfc_basis_in, |
Charge * | chg_in, | ||
K_Vectors * | pkv_in, | ||
UnitCell * | ucell_in, | ||
pseudopot_cell_vnl * | ppcell_in, | ||
ModulePW::PW_Basis * | rhodpw_in, | ||
ModulePW::PW_Basis * | rhopw_in, | ||
ModulePW::PW_Basis_Big * | bigpw_in | ||
) |
elecstate::ElecStatePW< T, Device >::~ElecStatePW | ( | ) |
|
protected |
add to the charge density in reciprocal space the part which is due to the US augmentation.
|
protected |
Non-local pseudopotentials \sum_lm Q_lm(r) \sum_i <psi_i|beta_l><beta_m|psi_i> w_i
void elecstate::ElecStatePW< T, Device >::cal_becsum | ( | const psi::Psi< T, Device > & | psi | ) |
calculate becsum for uspp
|
virtual |
void elecstate::ElecStatePW< T, Device >::init_rho_data | ( | ) |
init rho_data and kin_r_data
void elecstate::ElecStatePW< std::complex< double >, base_device::DEVICE_CPU >::init_rho_data | ( | ) |
|
protected |
sum over all pools for rho and ebands
|
virtual |
interface for HSolver to calculate rho from Psi
Reimplemented in elecstate::ElecStatePW_SDFT< T, Device >.
|
protected |
calcualte rho for each k
only occupied band should be calculated. be care of when smearing_sigma is large, wg would less than 0
only occupied band should be calculated.
|
protected |
calculate electronic charge density on grid points or density matrix in real space the consequence charge density rho saved into rho_out, preparing for charge mixing.
ModulePW::PW_Basis_K* elecstate::ElecStatePW< T, Device >::basis = nullptr |
Real* elecstate::ElecStatePW< T, Device >::becsum = nullptr |
|
protected |
|
protected |
Real** elecstate::ElecStatePW< T, Device >::kin_r = nullptr |
|
protected |
|
protected |
Real** elecstate::ElecStatePW< T, Device >::rho = nullptr |
|
protected |
T** elecstate::ElecStatePW< T, Device >::rhog = nullptr |
|
protected |
|
protected |
|
protected |
|
mutableprotected |
|
protected |
|
protected |