ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
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 ()
virtual ~ESolver_FP ()
virtual void before_all_runners (BaseCell &basecell, const Input_para &inp) override
 Initialize of the first-principels energy solver.
virtual void after_all_runners (BaseCell &basecell) override
 perform post processing calculations
Public Member Functions inherited from ModuleESolver::ESolver
 ESolver ()
virtual ~ESolver ()
virtual void runner (BaseCell &cell, const int istep)=0
 run energy solver
virtual void others (BaseCell &, const int)
virtual double cal_energy ()=0
 calculate total energy of a given system
virtual void cal_force (BaseCell &cell, ModuleBase::matrix &force)=0
 calcualte forces for the atoms in the given cell
virtual void cal_stress (BaseCell &cell, 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)
const vdw::VdwResult * get_vdw_result () const

Protected Attributes

std::unique_ptr< const vdw::VdwResult > vdw_result_
 vdW correction evaluated once for the current ionic configuration.
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 = nullptr
ModulePW::PW_Basis * pw_rhod = nullptr
ModulePW::PW_Basis_Big * pw_big = nullptr
 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
module_charge::Charge_Extra CE
 charge extrapolation method
surchem solvent
 solvent model
bool pw_rho_flag = false
 flag for pw_rho, 0: not initialized, 1: initialized
ModuleBase::TimePoint iter_time
 the start time of scf iteration
Protected Attributes inherited from ModuleESolver::ESolver
const Input_para * inp_ = nullptr
 Bound in before_all_runners; members use inp_->xxx instead of PARAM.inp.xxx.

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 ( )

◆ ~ESolver_FP()

ModuleESolver::ESolver_FP::~ESolver_FP ( )
virtual
Here is the call graph for this function:

Member Function Documentation

◆ after_all_runners()

void ModuleESolver::ESolver_FP::after_all_runners ( BaseCell & cell)
overridevirtual

◆ after_scf()

void ModuleESolver::ESolver_FP::after_scf ( UnitCell & ucell,
const int istep,
const bool conv_esolver )
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, 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< std::complex< double >, base_device::DEVICE_CPU >, ModuleESolver::ESolver_KS_PW< T, base_device::DEVICE_CPU >, ModuleESolver::ESolver_KS_PW_TDDFT< T, Device >, 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 ( BaseCell & basecell,
const Input_para & inp )
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) init charge extrapolation

5) 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) initialize the charge density, we need to first set xc_type,

Implements ModuleESolver::ESolver.

Reimplemented in ModuleESolver::ESolver_BSE< T, TR >, ModuleESolver::ESolver_DFPT_PW, ModuleESolver::ESolver_DM2rho< TK, TR >, ModuleESolver::ESolver_DoubleXC< TK, TR >, ModuleESolver::ESolver_GetS, ModuleESolver::ESolver_KS, 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< std::complex< double >, base_device::DEVICE_CPU >, ModuleESolver::ESolver_KS_PW< T, base_device::DEVICE_CPU >, ModuleESolver::ESolver_KS_PW_TDDFT< T, Device >, ModuleESolver::ESolver_LR< T, TR >, ModuleESolver::ESolver_LR< T, double >, ModuleESolver::ESolver_OF, and ModuleESolver::ESolver_SDFT_PW< T, Device >.

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

Evaluate the vdW correction once for this ionic configuration.

calculate ewald energy

set direction of magnetism, used in non-collinear case

output the initial charge density

Reimplemented in ModuleESolver::ESolver_DoubleXC< TK, TR >, ModuleESolver::ESolver_KS, 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< std::complex< double >, base_device::DEVICE_CPU >, ModuleESolver::ESolver_KS_PW< T, base_device::DEVICE_CPU >, ModuleESolver::ESolver_KS_PW_TDDFT< T, Device >, and ModuleESolver::ESolver_SDFT_PW< T, Device >.

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

◆ get_vdw_result()

const vdw::VdwResult * ModuleESolver::ESolver_FP::get_vdw_result ( ) const
inlineprotected
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

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, 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< std::complex< double >, base_device::DEVICE_CPU >, 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

module_charge::Charge_Extra ModuleESolver::ESolver_FP::CE
protected

charge extrapolation method

◆ chr

Charge ModuleESolver::ESolver_FP::chr
protected

Electorn charge density.

◆ iter_time

ModuleBase::TimePoint 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

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

Electronic states

◆ Pgrid

Parallel_Grid ModuleESolver::ESolver_FP::Pgrid
protected

parallel for rho grid

◆ pw_big

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

dense grid for USPP

[temp] pw_basis_big class

◆ pw_rho

ModulePW::PW_Basis* ModuleESolver::ESolver_FP::pw_rho = nullptr
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

bool 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 = nullptr
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

◆ vdw_result_

std::unique_ptr<const vdw::VdwResult> ModuleESolver::ESolver_FP::vdw_result_
protected

vdW correction evaluated once for the current ionic configuration.


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