ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
esolver_dfpt_pw.h
Go to the documentation of this file.
1// ============================================================
2// This code is added by Mohan Chen on 2026-05-18.
3// This code is currently in the design phase and has not been
4// put into production yet. It may change in the future.
5// Please use this code with caution. Only developers who know
6// what they are doing should use this code.
7// ============================================================
8
9#ifndef ESOLVER_DFPT_PW_H
10#define ESOLVER_DFPT_PW_H
11
12#include "esolver_ks_pw.h"
14
15namespace ModuleDFPT
16{
17class XC_First_Order;
18}
19
20namespace ModuleESolver
21{
22
23class ESolver_DFPT_PW : public ESolver_KS_PW<std::complex<double>, base_device::DEVICE_CPU>
24{
25 public:
28
29 void before_all_runners(BaseCell &basecell, const Input_para &inp) override;
30 void runner(BaseCell &basecell, const int istep) override;
31 void after_all_runners(BaseCell &basecell) override;
32
33 protected:
35
39
40 bool gs_done_ = false;
41
42 bool dfpt_wired_ = false;
43
47 int nspin_ = 1;
48
49 double nelec_ = 0.0;
50
51 double ecutwfc_ = 0.0;
52
53 bool dft_plus_u_ = false;
54
58 bool domag_ = false;
59
60 bool domag_z_ = false;
61
62 void run_gs(UnitCell &ucell);
63
67 void init_dfpt(UnitCell &ucell);
68
69 void run_post_process(UnitCell &ucell);
70};
71
72} // namespace ModuleESolver
73
74#endif // ESOLVER_DFPT_PW_H
Definition basecell.h:9
Density-functional perturbation theory driver (plane waves).
Definition dfpt_pw.h:80
First-order exchange-correlation kernel contract (C6).
Definition dfpt_rho.h:39
void before_all_runners(BaseCell &basecell, const Input_para &inp) override
Initialize of the first-principels energy solver.
Definition esolver_dfpt_pw.cpp:204
double nelec_
Definition esolver_dfpt_pw.h:49
bool dfpt_wired_
Definition esolver_dfpt_pw.h:42
bool dft_plus_u_
Definition esolver_dfpt_pw.h:53
bool domag_
Definition esolver_dfpt_pw.h:58
void init_dfpt(UnitCell &ucell)
Definition esolver_dfpt_pw.cpp:291
ModuleDFPT::XC_First_Order * xc_adapter_
Definition esolver_dfpt_pw.h:38
void after_all_runners(BaseCell &basecell) override
perform post processing calculations
Definition esolver_dfpt_pw.cpp:274
ModuleDFPT::DFPT_PW * dfpt_
Definition esolver_dfpt_pw.h:34
ESolver_DFPT_PW()
Definition esolver_dfpt_pw.cpp:180
double ecutwfc_
Definition esolver_dfpt_pw.h:51
int nspin_
Definition esolver_dfpt_pw.h:47
bool gs_done_
Definition esolver_dfpt_pw.h:40
void run_gs(UnitCell &ucell)
Definition esolver_dfpt_pw.cpp:284
void run_post_process(UnitCell &ucell)
Definition esolver_dfpt_pw.cpp:482
bool domag_z_
Definition esolver_dfpt_pw.h:60
~ESolver_DFPT_PW()
Definition esolver_dfpt_pw.cpp:190
void runner(BaseCell &basecell, const int istep) override
run energy solver
Definition esolver_dfpt_pw.cpp:248
Provide the basic information about unitcell.
Definition unitcell.h:16
Definition esolver_dfpt_pw.h:16
The First-Principles (FP) Energy Solver Class.
Definition opt_test_tools.cpp:93
Definition input_parameter.h:13