ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
elecstate::ElecStatePW_SDFT< T, Device > Class Template Reference

#include <elecstate_pw_sdft.h>

Inheritance diagram for elecstate::ElecStatePW_SDFT< T, Device >:
Collaboration diagram for elecstate::ElecStatePW_SDFT< T, Device >:

Public Member Functions

 ElecStatePW_SDFT (ModulePW::PW_Basis_K *wfc_basis_in, Charge *chr_in, K_Vectors *pkv_in, UnitCell *ucell_in, pseudopot_cell_vnl *ppcell_in, ModulePW::PW_Basis *rhopw_in, ModulePW::PW_Basis_Big *bigpw_in)
virtual void psiToRho (const psi::Psi< T, Device > &psi) override
Public Member Functions inherited from elecstate::ElecStatePW< T, Device >
void init_rho_data ()
 ElecStatePW (ModulePW::PW_Basis_K *wfc_basis_in, Charge *chr_in, K_Vectors *pkv_in, UnitCell *ucell_in, pseudopot_cell_vnl *ppcell_in, ModulePW::PW_Basis *rhopw_in, ModulePW::PW_Basis_Big *bigpw_in)
 ~ElecStatePW ()
void psiToRho (const psi::Psi< T, Device > &psi) override
 interface for HSolver to calculate rho from Psi
void cal_tau (const psi::Psi< T, Device > &psi) override
void cal_becsum (const psi::Psi< T, Device > &psi)
 calculate becsum for uspp
const std::vector< double > & get_becsum () const
 Return the USPP projector occupancy coefficients.
Public Member Functions inherited from elecstate::ElecState
 ElecState ()
 ElecState (Charge *chr_in, ModulePW::PW_Basis *rhopw_in, ModulePW::PW_Basis_Big *bigpw_in)
virtual ~ElecState ()
void init_ks (Charge *chr_in, const K_Vectors *klist_in, int nk_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< std::complex< double >, base_device::DEVICE_GPU > &psi)
virtual void psiToRho (const psi::Psi< double > &psi)
virtual void psiToRho (const psi::Psi< double, base_device::DEVICE_GPU > &psi)
virtual void psiToRho (const psi::Psi< std::complex< float > > &psi)
virtual void psiToRho (const psi::Psi< std::complex< float >, base_device::DEVICE_GPU > &psi)
virtual void cal_tau (const psi::Psi< std::complex< double > > &psi)
virtual void cal_tau (const psi::Psi< std::complex< double >, base_device::DEVICE_GPU > &psi)
virtual void cal_tau (const psi::Psi< double > &psi)
virtual void cal_tau (const psi::Psi< double, base_device::DEVICE_GPU > &psi)
virtual void cal_tau (const psi::Psi< std::complex< float > > &psi)
virtual void cal_tau (const psi::Psi< std::complex< float >, base_device::DEVICE_GPU > &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 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, const int imp_sol, const bool sc_mag_switch, const int dft_plus_u, const std::string &assume_isolated)
 assemble the total energy from its contributions
void set_exx (const double &Eexx, const bool cal_exx, const double hybrid_alpha)
 calculation if converged
void set_exx (const std::complex< double > &Eexx, const bool cal_exx, const double hybrid_alpha)
double get_hartree_energy ()
double get_etot_efield ()
double get_etot_gatefield ()
double get_solvent_model_Ael ()
double get_solvent_model_Acav ()
void set_spin_constrain_energy (const double energy)
 Constraint energy (Ry), supplied after updating the atomic magnetic moments.
double get_dftu_energy ()
void set_dftu_energy (double e)
double get_local_pp_energy ()

Private Types

using Real = typename GetTypeReal<T>::type
using setmem_var_op = base_device::memory::set_memory_op<Real, Device>
using castmem_var_d2h_op = base_device::memory::cast_memory_op<double, Real, base_device::DEVICE_CPU, Device>

Additional Inherited Members

Public Attributes inherited from elecstate::ElecStatePW< T, Device >
Real ** rho
T ** rhog
Real ** kin_r
ModulePW::PW_Basis_K * basis
Public Attributes inherited from elecstate::ElecState
std::vector< double > nelec_spin
std::string classname = "elecstate"
int iter = 0
 scf iteration
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 inherited from elecstate::ElecStatePW< T, Device >
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 (std::complex< double > **rhog)
Protected Attributes inherited from elecstate::ElecStatePW< T, Device >
ModulePW::PW_Basis * rhopw_smooth
UnitCell * ucell
const pseudopot_cell_vnl * ppcell
Device * ctx
bool init_rho
T * vkb
Real * rho_data
T * rhog_data
Real * kin_r_data
T * wfcr
T * wfcr_another_spin

Member Typedef Documentation

◆ castmem_var_d2h_op

template<typename T, typename Device>
using elecstate::ElecStatePW_SDFT< T, Device >::castmem_var_d2h_op = base_device::memory::cast_memory_op<double, Real, base_device::DEVICE_CPU, Device>
private

◆ Real

template<typename T, typename Device>
using elecstate::ElecStatePW_SDFT< T, Device >::Real = typename GetTypeReal<T>::type
private

◆ setmem_var_op

template<typename T, typename Device>
using elecstate::ElecStatePW_SDFT< T, Device >::setmem_var_op = base_device::memory::set_memory_op<Real, Device>
private

Constructor & Destructor Documentation

◆ ElecStatePW_SDFT()

template<typename T, typename Device>
elecstate::ElecStatePW_SDFT< T, Device >::ElecStatePW_SDFT ( ModulePW::PW_Basis_K * wfc_basis_in,
Charge * chr_in,
K_Vectors * pkv_in,
UnitCell * ucell_in,
pseudopot_cell_vnl * ppcell_in,
ModulePW::PW_Basis * rhopw_in,
ModulePW::PW_Basis_Big * bigpw_in )
inline
Here is the call graph for this function:

Member Function Documentation

◆ psiToRho()

template<typename T, typename Device>
void elecstate::ElecStatePW_SDFT< T, Device >::psiToRho ( const psi::Psi< T, Device > & psi)
overridevirtual
Here is the call graph for this function:

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