ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
deepks_lcao.h
Go to the documentation of this file.
1#ifndef DEEPKSLCAO_H
2#define DEEPKSLCAO_H
9#include "operator_lcao.h"
10
11namespace hamilt
12{
13
14#ifndef __MLALGOTEMPLATE
15#define __MLALGOTEMPLATE
16
22template <class T>
23class DeePKS : public T
24{
25};
26
27#endif
28
29template <typename TK, typename TR>
30class DeePKS<OperatorLCAO<TK, TR>> : public OperatorLCAO<TK, TR>
31{
32 public:
34 const std::vector<ModuleBase::Vector3<double>>& kvec_d_in,
35 HContainer<TR>* hR_in,
36 const UnitCell* ucell_in,
37 const Grid_Driver* GridD_in,
38 const TwoCenterIntegrator* intor_orb_alpha,
39 const LCAO_Orbitals* ptr_orb,
40 const int& nks_in,
42#ifdef __MLALGO
43 ,
44 LCAO_Deepks<TK>* ld_in
45#endif
46 );
47 ~DeePKS();
48
53 virtual void contributeHR() override;
54#ifdef __MLALGO
60 virtual void contributeHk(int ik) override;
61
63 {
64 return this->V_delta_R;
65 }
66#endif
67
68 private:
70
71 const UnitCell* ucell = nullptr;
72 Grid_Driver* gridD = nullptr;
73
74 const Grid_Driver* gd = nullptr;
75
76 HContainer<TR>* V_delta_R = nullptr;
77
78 // the following variable is introduced temporarily during LCAO refactoring
79 const TwoCenterIntegrator* intor_orb_alpha_ = nullptr;
80 const LCAO_Orbitals* ptr_orb_ = nullptr;
81
82#ifdef __MLALGO
83
84 LCAO_Deepks<TK>* ld = nullptr;
85
91 void initialize_HR(const Grid_Driver* GridD);
92
98
102 void cal_HR_IJR(const double* hr_in, const int& row_size, const int& col_size, TR* data_pointer);
103
108 std::vector<AdjacentAtomInfo> adjs_all;
109#endif
110 const int& nks;
111};
112
113} // namespace hamilt
114#endif
Definition sltk_grid_driver.h:43
Definition LCAO_deepks.h:52
Definition ORB_read.h:19
A class to compute two-center integrals.
Definition two_center_integrator.h:35
Definition unitcell.h:16
Definition density_matrix.h:36
HContainer< TR > * get_V_delta_R() const
Definition deepks_lcao.h:62
elecstate::DensityMatrix< TK, double > * DM
Definition deepks_lcao.h:69
std::vector< AdjacentAtomInfo > adjs_all
initialize V_delta_R, search the nearest neighbor atoms used for calculate the DeePKS real space Hami...
Definition deepks_lcao.h:108
void calculate_HR()
calculate the DeePKS correction matrix with specific <I,J,R> atom-pairs use the adjs_all to calculate...
virtual void contributeHk(int ik) override
contribute the DeePKS correction for each k-point to V_delta this function is not used for update hK,...
void initialize_HR(const Grid_Driver *GridD)
initialize HR, search the nearest neighbor atoms HContainer is used to store the DeePKS real space Ha...
virtual void contributeHR() override
contribute the DeePKS correction to real space Hamiltonian this function is used for update hR and V_...
const int & nks
Definition deepks_lcao.h:110
void cal_HR_IJR(const double *hr_in, const int &row_size, const int &col_size, TR *data_pointer)
calculate the HR local matrix of <I,J,R> atom pair
Definition deepks_lcao.h:24
Definition hcontainer.h:144
Definition hs_matrix_k.hpp:11
Definition operator_lcao.h:12
#define T
Definition exp.cpp:237
Definition hamilt.h:12