|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
#include <esolver_fp.h>
Public Member Functions | |
| ESolver_FP () | |
| virtual | ~ESolver_FP () |
| 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) |
| virtual void | after_scf (UnitCell &ucell, const int istep, const bool conv_esolver) |
| virtual void | iter_finish (UnitCell &ucell, const int istep, int &iter, bool &conv_esolver) |
Protected Attributes | |
| elecstate::ElecState * | pelec = nullptr |
| These pointers will be deleted in the free_pointers() function every ion step. | |
| 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 | |
| bool | 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 |
| ModuleESolver::ESolver_FP::ESolver_FP | ( | ) |
|
virtual |
|
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 |
Output convergence information
Write Fermi energy
Update delta_rho for charge extrapolation
print out charge density, potential, elf, etc.
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) setup pw_rho, pw_rhod, pw_big, sf, and read_pseudopotentials
3) setup structure factors
4) write geometry file
5) init charge extrapolation
6) symmetry analysis should be performed every time the cell is changed
7) setup k points in the Brillouin zone according to symmetry.
8) print information
9) parallel of FFT grid
10) calculate the structure factor
11) setup the xc functional
11) initialize the charge density, we need to first set xc_type,
Implements ModuleESolver::ESolver.
Reimplemented in ModuleESolver::ESolver_DM2rho< TK, TR >, ModuleESolver::ESolver_DoubleXC< 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 |
calculate D2 or D3 vdW
calculate ewald energy
set direction of magnetism, used in non-collinear case
output the initial charge density and potential
Reimplemented in ModuleESolver::ESolver_DoubleXC< TK, TR >, 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 |
output charge density in G-space, or if available, kinetic energy density in G-space
Reimplemented in ModuleESolver::ESolver_DoubleXC< TK, TR >, 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 >.
|
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 |
These pointers will be deleted in the free_pointers() function every ion step.
Electronic states
|
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