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

#include <esolver_fp.h>

Inheritance diagram for ModuleESolver::ESolver_FP:
Collaboration diagram for ModuleESolver::ESolver_FP:

Public Member Functions

 ESolver_FP ()
 Constructor.
 
virtual ~ESolver_FP ()
 Deconstructor.
 
virtual void before_all_runners (UnitCell &ucell, const Input_para &inp) override
 Initialize of the first-principels energy solver.
 
virtual void after_all_runners (UnitCell &ucell) override
 perform post processing calculations
 
- Public Member Functions inherited from ModuleESolver::ESolver
 ESolver ()
 
virtual ~ESolver ()
 
virtual void runner (UnitCell &cell, const int istep)=0
 run energy solver
 
virtual void others (UnitCell &ucell, const int istep)
 
virtual double cal_energy ()=0
 calculate total energy of a given system
 
virtual void cal_force (UnitCell &ucell, ModuleBase::matrix &force)=0
 calcualte forces for the atoms in the given cell
 
virtual void cal_stress (UnitCell &ucell, ModuleBase::matrix &stress)=0
 calcualte stress of given cell
 

Protected Member Functions

virtual void before_scf (UnitCell &ucell, const int istep)
 Something to do before SCF iterations.
 
virtual void after_scf (UnitCell &ucell, const int istep, const bool conv_esolver)
 Something to do after SCF iterations when SCF is converged or comes to the max iter step.
 
virtual void iter_finish (UnitCell &ucell, const int istep, int &iter, bool &conv_esolver)
 Something to do after hamilt2rho function in each iter loop.
 

Protected Attributes

elecstate::ElecStatepelec = nullptr
 Electronic states.
 
K_Vectors kv
 K points in Brillouin zone.
 
Charge chr
 Electorn charge density.
 
ModulePW::PW_Basispw_rho
 
ModulePW::PW_Basispw_rhod
 
ModulePW::PW_Basis_Bigpw_big
 dense grid for USPP
 
Parallel_Grid Pgrid
 parallel for rho grid
 
Structure_Factor sf
 Structure factors that used with plane-wave basis set.
 
pseudopot_cell_vl locpp
 local pseudopotentials
 
Charge_Extra CE
 charge extrapolation method
 
surchem solvent
 solvent model
 
int pw_rho_flag = false
 flag for pw_rho, 0: not initialized, 1: initialized
 
double iter_time
 the start time of scf iteration
 

Additional Inherited Members

- Public Attributes inherited from ModuleESolver::ESolver
bool conv_esolver = true
 
std::string classname
 

Constructor & Destructor Documentation

◆ ESolver_FP()

ModuleESolver::ESolver_FP::ESolver_FP ( )

Constructor.

◆ ~ESolver_FP()

ModuleESolver::ESolver_FP::~ESolver_FP ( )
virtual

Deconstructor.

Member Function Documentation

◆ after_all_runners()

void ModuleESolver::ESolver_FP::after_all_runners ( UnitCell ucell)
overridevirtual

◆ after_scf()

void ModuleESolver::ESolver_FP::after_scf ( UnitCell ucell,
const int  istep,
const bool  conv_esolver 
)
protectedvirtual

Something to do after SCF iterations when SCF is converged or comes to the max iter step.

Reimplemented in ModuleESolver::ESolver_KS< T, Device >, ModuleESolver::ESolver_KS< std::complex< double > >, ModuleESolver::ESolver_KS< T, base_device::DEVICE_CPU >, ModuleESolver::ESolver_KS< TK >, ModuleESolver::ESolver_KS_LCAO< TK, TR >, ModuleESolver::ESolver_KS_LCAO< std::complex< double >, TR >, ModuleESolver::ESolver_KS_LCAO_TDDFT< TR, Device >, ModuleESolver::ESolver_KS_PW< T, Device >, ModuleESolver::ESolver_KS_PW< T, base_device::DEVICE_CPU >, and ModuleESolver::ESolver_SDFT_PW< T, Device >.

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

◆ before_all_runners()

void ModuleESolver::ESolver_FP::before_all_runners ( UnitCell ucell,
const Input_para inp 
)
overridevirtual

Initialize of the first-principels energy solver.

1) read pseudopotentials

2) initialie the plane wave basis for rho

3) initialize the double grid (for uspp) if necessary

4) print some information

5) initialize the charge extrapolation method if necessary

Implements ModuleESolver::ESolver.

Reimplemented in ModuleESolver::ESolver_DM2rho< TK, TR >, ModuleESolver::ESolver_GetS, ModuleESolver::ESolver_KS< T, Device >, ModuleESolver::ESolver_KS< std::complex< double > >, ModuleESolver::ESolver_KS< T, base_device::DEVICE_CPU >, ModuleESolver::ESolver_KS< TK >, ModuleESolver::ESolver_KS_LCAO< TK, TR >, ModuleESolver::ESolver_KS_LCAO< std::complex< double >, TR >, ModuleESolver::ESolver_KS_LCAO_TDDFT< TR, Device >, ModuleESolver::ESolver_KS_LIP< T >, ModuleESolver::ESolver_KS_PW< T, Device >, ModuleESolver::ESolver_KS_PW< T, base_device::DEVICE_CPU >, ModuleESolver::ESolver_OF, ModuleESolver::ESolver_SDFT_PW< T, Device >, and LR::ESolver_LR< T, TR >.

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

◆ before_scf()

void ModuleESolver::ESolver_FP::before_scf ( UnitCell ucell,
const int  istep 
)
protectedvirtual

Something to do before SCF iterations.

calculate D2 or D3 vdW

calculate ewald energy

set direction of magnetism, used in non-collinear case

output the initial charge density

output total local potential of the initial charge density

Reimplemented in ModuleESolver::ESolver_KS< T, Device >, ModuleESolver::ESolver_KS< std::complex< double > >, ModuleESolver::ESolver_KS< T, base_device::DEVICE_CPU >, ModuleESolver::ESolver_KS< TK >, ModuleESolver::ESolver_KS_LCAO< TK, TR >, ModuleESolver::ESolver_KS_LCAO< std::complex< double >, TR >, ModuleESolver::ESolver_KS_LIP< T >, ModuleESolver::ESolver_KS_PW< T, Device >, ModuleESolver::ESolver_KS_PW< T, base_device::DEVICE_CPU >, and ModuleESolver::ESolver_SDFT_PW< T, Device >.

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

◆ iter_finish()

void ModuleESolver::ESolver_FP::iter_finish ( UnitCell ucell,
const int  istep,
int &  iter,
bool &  conv_esolver 
)
protectedvirtual

Something to do after hamilt2rho function in each iter loop.

output charge density

Reimplemented in ModuleESolver::ESolver_KS< T, Device >, ModuleESolver::ESolver_KS< std::complex< double > >, ModuleESolver::ESolver_KS< T, base_device::DEVICE_CPU >, ModuleESolver::ESolver_KS< TK >, ModuleESolver::ESolver_KS_LCAO< TK, TR >, ModuleESolver::ESolver_KS_LCAO< std::complex< double >, TR >, ModuleESolver::ESolver_KS_LCAO_TDDFT< TR, Device >, ModuleESolver::ESolver_KS_LIP< T >, ModuleESolver::ESolver_KS_PW< T, Device >, ModuleESolver::ESolver_KS_PW< T, base_device::DEVICE_CPU >, and ModuleESolver::ESolver_SDFT_PW< T, Device >.

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

Member Data Documentation

◆ CE

Charge_Extra ModuleESolver::ESolver_FP::CE
protected

charge extrapolation method

◆ chr

Charge ModuleESolver::ESolver_FP::chr
protected

Electorn charge density.

◆ iter_time

double ModuleESolver::ESolver_FP::iter_time
protected

the start time of scf iteration

◆ kv

K_Vectors ModuleESolver::ESolver_FP::kv
protected

K points in Brillouin zone.

◆ locpp

pseudopot_cell_vl ModuleESolver::ESolver_FP::locpp
protected

local pseudopotentials

◆ pelec

elecstate::ElecState* ModuleESolver::ESolver_FP::pelec = nullptr
protected

Electronic states.


These pointers will be deleted in the free_pointers() function every ion step.

◆ Pgrid

Parallel_Grid ModuleESolver::ESolver_FP::Pgrid
protected

parallel for rho grid

◆ pw_big

ModulePW::PW_Basis_Big* ModuleESolver::ESolver_FP::pw_big
protected

dense grid for USPP

[temp] pw_basis_big class

◆ pw_rho

ModulePW::PW_Basis* ModuleESolver::ESolver_FP::pw_rho
protected

pw_rho: Plane-wave basis set for charge density pw_rhod: same as pw_rho for NCPP. Here 'd' stands for 'dense', dense grid for for uspp, used for ultrasoft augmented charge density. charge density and potential are defined on dense grids, but effective potential needs to be interpolated on smooth grids in order to compute Veff|psi>

◆ pw_rho_flag

int ModuleESolver::ESolver_FP::pw_rho_flag = false
protected

flag for pw_rho, 0: not initialized, 1: initialized

◆ pw_rhod

ModulePW::PW_Basis* ModuleESolver::ESolver_FP::pw_rhod
protected

◆ sf

Structure_Factor ModuleESolver::ESolver_FP::sf
protected

Structure factors that used with plane-wave basis set.

◆ solvent

surchem ModuleESolver::ESolver_FP::solvent
protected

solvent model


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