ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
kedf_manager.h
Go to the documentation of this file.
1#ifndef KEDF_MANAGER_H
2#define KEDF_MANAGER_H
3
7#include "kedf_lkt.h"
8#include "kedf_tf.h"
9#include "kedf_vw.h"
10#include "kedf_wt.h"
11#include "kedf_xwm.h"
12#include "kedf_ml.h"
13
15{
16 public:
18
20 {
21 delete this->lkt_;
22 delete this->tf_;
23 delete this->vw_;
24 delete this->wt_;
25#ifdef __MLALGO
26 delete this->ml_;
27#endif
28 }
29
30 void init(
31 const Input_para& inp,
32 ModulePW::PW_Basis* pw_rho,
33 const double dV,
34 const double nelec
35 );
36
37 void get_potential(
38 const double* const* prho,
39 const double* const* pphi,
40 ModulePW::PW_Basis* pw_rho,
42 );
43
44 double get_energy();
45
47 const double* const* prho,
48 const double* const* pphi,
49 ModulePW::PW_Basis* pw_rho,
50 double** rtau
51 );
52
53 void get_stress(
54 const double omega,
55 const double* const* prho,
56 const double* const* pphi,
57 ModulePW::PW_Basis* pw_rho,
58 ModuleBase::matrix& kinetic_stress_
59 );
60
61 void record_energy(
62 std::vector<std::string> &titles,
63 std::vector<double> &energies_Ry
64 );
65
67 const double * const *prho,
68 ModulePW::PW_Basis *pw_rho,
69 const double *veff
70 );
71
72private:
73
74 KEDF_LKT* lkt_ = nullptr; // Luo-Karasiev-Trickey KEDF
75 KEDF_TF* tf_ = nullptr; // Thomas-Fermi KEDF
76 KEDF_vW* vw_ = nullptr; // von Weizsäcker KEDF
77 KEDF_WT* wt_ = nullptr; // Wang-Teter KEDF
78 KEDF_XWM* xwm_ = nullptr; // Xu-Wang-Ma KEDF
79#ifdef __MLALGO
80 KEDF_ML* ml_ = nullptr; // Machine Learning KEDF
81#endif
82
83 std::string of_kinetic_ = "wt"; // Kinetic energy functional, such as TF, VW, WT
84};
85
86#endif // KEDF_MANAGER_H
A class which calculates the kinetic energy, potential, and stress with Luo-Karasiev-Trickey (LKT) KE...
Definition kedf_lkt.h:18
Definition kedf_ml.h:12
Definition kedf_manager.h:15
KEDF_LKT * lkt_
Definition kedf_manager.h:74
void get_energy_density(const double *const *prho, const double *const *pphi, ModulePW::PW_Basis *pw_rho, double **rtau)
[Interface to kedf] Calculated the kinetic energy density, ONLY SPIN=1 SUPPORTED
Definition kedf_manager.cpp:222
void get_stress(const double omega, const double *const *prho, const double *const *pphi, ModulePW::PW_Basis *pw_rho, ModuleBase::matrix &kinetic_stress_)
[Interface to kedf] Calculate the stress of kedf
Definition kedf_manager.cpp:267
void generate_ml_target(const double *const *prho, ModulePW::PW_Basis *pw_rho, const double *veff)
Definition kedf_manager.cpp:360
~KEDF_Manager()
Definition kedf_manager.h:19
KEDF_TF * tf_
Definition kedf_manager.h:75
void record_energy(std::vector< std::string > &titles, std::vector< double > &energies_Ry)
Definition kedf_manager.cpp:319
KEDF_XWM * xwm_
Definition kedf_manager.h:78
KEDF_vW * vw_
Definition kedf_manager.h:76
void init(const Input_para &inp, ModulePW::PW_Basis *pw_rho, const double dV, const double nelec)
[Interface to kedf] Initialize the KEDFs.
Definition kedf_manager.cpp:12
KEDF_WT * wt_
Definition kedf_manager.h:77
KEDF_Manager()
Definition kedf_manager.h:17
void get_potential(const double *const *prho, const double *const *pphi, ModulePW::PW_Basis *pw_rho, ModuleBase::matrix &rpot)
[Interface to kedf] Calculated the kinetic potential and plus it to rpot,
Definition kedf_manager.cpp:110
std::string of_kinetic_
Definition kedf_manager.h:83
KEDF_ML * ml_
Definition kedf_manager.h:80
double get_energy()
[Interface to kedf] Return the kinetic energy
Definition kedf_manager.cpp:169
A class which calculates the kinetic energy, potential, and stress with Thomas-Fermi (TF) KEDF....
Definition kedf_tf.h:18
A class which calculates the kinetic energy, potential, and stress with Wang-Teter (WT) KEDF....
Definition kedf_wt.h:18
A class which calculates the kinetic energy, potential, and stress with Xie-Wang-Morales (XWM) KEDF....
Definition kedf_xwm.h:14
A class which calculates the kinetic energy, potential, and stress with von Weizsäcker (vW) KEDF....
Definition kedf_vw.h:18
Definition matrix.h:19
A class which can convert a function of "r" to the corresponding linear superposition of plane waves ...
Definition pw_basis.h:56
Definition input_parameter.h:12