ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
elecstate::ElecState Class Reference

#include <elecstate.h>

Inheritance diagram for elecstate::ElecState:
Collaboration diagram for elecstate::ElecState:

Public Member Functions

 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

std::vector< double > nelec_spin
 
std::string classname = "elecstate"
 
int iter = 0
 scf iteration
 
double omega = 0.0
 volume
 
Potentialpot = nullptr
 pointer to potential
 
Chargecharge = nullptr
 pointer to charge density
 
const K_Vectorsklist = nullptr
 pointer to k points lists
 
const ModulePW::PW_Basis_Bigbigpw = 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
 

Constructor & Destructor Documentation

◆ ElecState() [1/2]

elecstate::ElecState::ElecState ( )
inline

◆ ElecState() [2/2]

elecstate::ElecState::ElecState ( Charge charge_in,
ModulePW::PW_Basis rhopw_in,
ModulePW::PW_Basis_Big bigpw_in 
)
inline
Here is the call graph for this function:

◆ ~ElecState()

virtual elecstate::ElecState::~ElecState ( )
inlinevirtual

Member Function Documentation

◆ cal_bandgap()

void elecstate::ElecState::cal_bandgap ( )

calculate band gap

Here is the call graph for this function:

◆ cal_bandgap_updw()

void elecstate::ElecState::cal_bandgap_updw ( )

calculate spin up & down band gap

Todo:
add isk[ik] so as to discriminate different spins
Here is the call graph for this function:

◆ cal_converged()

void elecstate::ElecState::cal_converged ( )

calculation if converged

Here is the call graph for this function:

◆ cal_delta_eband()

double elecstate::ElecState::cal_delta_eband ( const UnitCell ucell) const

calculate deband

Here is the call graph for this function:

◆ cal_delta_escf()

double elecstate::ElecState::cal_delta_escf ( ) const

calculate descf

Here is the call graph for this function:

◆ cal_energies()

void elecstate::ElecState::cal_energies ( const int  type)

calculate energies

Parameters
type1 means Harris-Foulkes functinoal;
type2 means Kohn-Sham functional;

Hartree energy

energy from E-field

energy from gate-field

energy from implicit solvation model

spin constrained energy

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cal_tau() [1/3]

virtual void elecstate::ElecState::cal_tau ( const psi::Psi< double > &  psi)
inlinevirtual

Reimplemented in elecstate::ElecStateLCAO< TK >.

◆ cal_tau() [2/3]

virtual void elecstate::ElecState::cal_tau ( const psi::Psi< std::complex< double > > &  psi)
inlinevirtual

Reimplemented in elecstate::ElecStateLCAO< TK >.

◆ cal_tau() [3/3]

virtual void elecstate::ElecState::cal_tau ( const psi::Psi< std::complex< float > > &  psi)
inlinevirtual

◆ get_dftu_energy()

double elecstate::ElecState::get_dftu_energy ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_etot_efield()

double elecstate::ElecState::get_etot_efield ( )
Here is the caller graph for this function:

◆ get_etot_gatefield()

double elecstate::ElecState::get_etot_gatefield ( )
Here is the caller graph for this function:

◆ get_hartree_energy()

double elecstate::ElecState::get_hartree_energy ( )
Here is the caller graph for this function:

◆ get_local_pp_energy()

double elecstate::ElecState::get_local_pp_energy ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_solvent_model_Acav()

double elecstate::ElecState::get_solvent_model_Acav ( )
Here is the caller graph for this function:

◆ get_solvent_model_Ael()

double elecstate::ElecState::get_solvent_model_Ael ( )
Here is the caller graph for this function:

◆ get_spin_constrain_energy()

virtual double elecstate::ElecState::get_spin_constrain_energy ( )
inlinevirtual

Reimplemented in elecstate::ElecStateLCAO< TK >, elecstate::ElecStateLCAO< TK >, and elecstate::ElecStateLCAO< TK >.

Here is the caller graph for this function:

◆ getNewRho()

virtual void elecstate::ElecState::getNewRho ( )
inlinevirtual

◆ getRho()

const double * elecstate::ElecState::getRho ( int  spin) const
virtual

◆ init_ks()

void elecstate::ElecState::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 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_nelec_spin()

void elecstate::ElecState::init_nelec_spin ( )
Here is the caller graph for this function:

◆ init_scf()

void elecstate::ElecState::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.

Parameters
istepi-th step
ucellunit cell
strucfacstructure factor
symmsymmetry
wfcpwPW basis for wave function if needed

core correction potential.

other effective potentials need charge density,

renormalize the charge density

initialize the potential

Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_psi() [1/2]

virtual void elecstate::ElecState::print_psi ( const psi::Psi< double > &  psi_in,
const int  istep = -1 
)
inlinevirtual

◆ print_psi() [2/2]

virtual void elecstate::ElecState::print_psi ( const psi::Psi< std::complex< double > > &  psi_in,
const int  istep = -1 
)
inlinevirtual

◆ psiToRho() [1/2]

virtual void elecstate::ElecState::psiToRho ( const psi::Psi< double > &  psi)
inlinevirtual

Reimplemented in elecstate::ElecStateLCAO< TK >.

◆ psiToRho() [2/2]

virtual void elecstate::ElecState::psiToRho ( const psi::Psi< std::complex< double > > &  psi)
inlinevirtual

Reimplemented in elecstate::ElecStateLCAO< TK >.

Here is the caller graph for this function:

◆ set_exx() [1/2]

void elecstate::ElecState::set_exx ( const double &  Eexx)

calculation if converged

Date
Peize Lin add 2016-12-03
Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_exx() [2/2]

void elecstate::ElecState::set_exx ( const std::complex< double > &  Eexx)

Member Data Documentation

◆ bandgap

double elecstate::ElecState::bandgap = 0.0

bandgap = E_{lumo} - E_{homo}

◆ bandgap_dw

double elecstate::ElecState::bandgap_dw = 0.0

spin down bandgap

◆ bandgap_up

double elecstate::ElecState::bandgap_up = 0.0

spin up bandgap

◆ bigpw

const ModulePW::PW_Basis_Big* elecstate::ElecState::bigpw = nullptr

bigpw will be removed later

◆ charge

Charge* elecstate::ElecState::charge = nullptr

pointer to charge density

◆ classname

std::string elecstate::ElecState::classname = "elecstate"

◆ eferm

efermi elecstate::ElecState::eferm

fermi energies

◆ ekb

ModuleBase::matrix elecstate::ElecState::ekb

band energy at each k point, each band.

◆ f_en

fenergy elecstate::ElecState::f_en

energies contribute to the total free energy

◆ iter

int elecstate::ElecState::iter = 0

scf iteration

◆ klist

const K_Vectors* elecstate::ElecState::klist = nullptr

pointer to k points lists

◆ nelec_spin

std::vector<double> elecstate::ElecState::nelec_spin

◆ omega

double elecstate::ElecState::omega = 0.0

volume

◆ pot

Potential* elecstate::ElecState::pot = nullptr

pointer to potential

◆ skip_weights

bool elecstate::ElecState::skip_weights = false

◆ vnew

ModuleBase::matrix elecstate::ElecState::vnew

◆ vnew_exist

bool elecstate::ElecState::vnew_exist = false

◆ wg

ModuleBase::matrix elecstate::ElecState::wg

occupation weight for each k-point and band


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