ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
#include <esolver_fp.h>
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 | |
![]() | |
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::ElecState * | pelec = nullptr |
Electronic states. | |
K_Vectors | kv |
K points in Brillouin zone. | |
Charge | chr |
Electorn charge density. | |
ModulePW::PW_Basis * | pw_rho |
ModulePW::PW_Basis * | pw_rhod |
ModulePW::PW_Basis_Big * | pw_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 | |
![]() | |
bool | conv_esolver = true |
std::string | classname |
ModuleESolver::ESolver_FP::ESolver_FP | ( | ) |
Constructor.
|
virtual |
Deconstructor.
|
overridevirtual |
perform post processing calculations
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_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 >.
|
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 >.
|
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 >.
|
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 >.
|
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 >.
|
protected |
charge extrapolation method
|
protected |
Electorn charge density.
|
protected |
the start time of scf iteration
|
protected |
K points in Brillouin zone.
|
protected |
local pseudopotentials
|
protected |
|
protected |
parallel for rho grid
|
protected |
dense grid for USPP
[temp] pw_basis_big class
|
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>
|
protected |
flag for pw_rho, 0: not initialized, 1: initialized
|
protected |
|
protected |
Structure factors that used with plane-wave basis set.
|
protected |
solvent model