ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
esolver_sdft_pw.h
Go to the documentation of this file.
1#ifndef ESOLVER_SDFT_PW_H
2#define ESOLVER_SDFT_PW_H
3
4#include "esolver_ks_pw.h"
9
10namespace ModuleESolver
11{
12
13template <typename T, typename Device = base_device::DEVICE_CPU>
14class ESolver_SDFT_PW : public ESolver_KS_PW<T, Device>
15{
16 private:
17 using Real = typename GetTypeReal<T>::type;
18
19 public:
22
23 void before_all_runners(BaseCell &basecell, const Input_para &inp) override;
24
25 double cal_energy() override;
26
27 void cal_force(BaseCell &basecell, ModuleBase::matrix &force) override;
28
29 void cal_stress(BaseCell &basecell, ModuleBase::matrix &stress) override;
30
31 public:
35
36 protected:
37 virtual void before_scf(UnitCell &ucell, const int istep) override;
38
39 virtual void hamilt2rho_single(
40 UnitCell &ucell,
41 const int istep,
42 const int iter,
43 const double ethr) override;
44
45 virtual void iter_finish(
46 UnitCell &ucell,
47 const int istep,
48 int &iter,
49 bool &conv_esolver) override;
50
51 virtual void after_scf(UnitCell &ucell, const int istep, const bool conv_esolver) override;
52
53 virtual void after_all_runners(BaseCell &basecell) override;
54
55 private:
58};
59
60} // namespace ModuleESolver
61#endif
Definition basecell.h:9
Definition matrix.h:15
Stochastic_WF< T, Device > stowf
Definition esolver_sdft_pw.h:32
void cal_stress(BaseCell &basecell, ModuleBase::matrix &stress) override
calcualte stress of given cell
Definition esolver_sdft_pw.cpp:220
typename GetTypeReal< T >::type Real
Definition esolver_sdft_pw.h:17
virtual void after_scf(UnitCell &ucell, const int istep, const bool conv_esolver) override
Something to do after SCF iterations when SCF is converged or comes to the max iter step.
Definition esolver_sdft_pw.cpp:132
StoHamiltPW< T, Device > * p_hamilt_sto
Definition esolver_sdft_pw.h:34
virtual void iter_finish(UnitCell &ucell, const int istep, int &iter, bool &conv_esolver) override
Something to do after hamilt2rho function in each iter loop.
Definition esolver_sdft_pw.cpp:114
int method_sto
method of SDFT
Definition esolver_sdft_pw.h:57
virtual void after_all_runners(BaseCell &basecell) override
perform post processing calculations
Definition esolver_sdft_pw.cpp:234
void cal_force(BaseCell &basecell, ModuleBase::matrix &force) override
calcualte forces for the atoms in the given cell
Definition esolver_sdft_pw.cpp:206
virtual void hamilt2rho_single(UnitCell &ucell, const int istep, const int iter, const double ethr) override
Definition esolver_sdft_pw.cpp:144
StoChe< Real, Device > stoche
Definition esolver_sdft_pw.h:33
int nche_sto
norder of Chebyshev
Definition esolver_sdft_pw.h:56
virtual void before_scf(UnitCell &ucell, const int istep) override
Something to do before SCF iterations.
Definition esolver_sdft_pw.cpp:92
void before_all_runners(BaseCell &basecell, const Input_para &inp) override
Initialize of the first-principels energy solver.
Definition esolver_sdft_pw.cpp:39
~ESolver_SDFT_PW()
Definition esolver_sdft_pw.cpp:31
ESolver_SDFT_PW()
Definition esolver_sdft_pw.cpp:24
double cal_energy() override
calculate total energy of a given system
Definition esolver_sdft_pw.cpp:200
bool conv_esolver
Definition esolver.h:46
Definition sto_che.h:12
Definition sto_hamilt_pw.h:8
Definition sto_wf.h:13
Provide the basic information about unitcell.
Definition unitcell.h:16
The First-Principles (FP) Energy Solver Class.
Definition opt_test_tools.cpp:93
T type
Definition macros.h:8
Definition input_parameter.h:13