ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
veff_lcao.h
Go to the documentation of this file.
1#ifndef VEFFLCAO_H
2#define VEFFLCAO_H
3#include "source_base/timer.h"
7#include "operator_lcao.h"
10#include <vector>
11
12namespace hamilt
13{
14
15#ifndef __VEFFTEMPLATE
16#define __VEFFTEMPLATE
17
18template <class T>
19class Veff : public T
20{
21};
22
23#endif
24
30template <typename TK, typename TR>
31class Veff<OperatorLCAO<TK, TR>> : public OperatorLCAO<TK, TR>
32{
33 public:
39 HS_Matrix_K<TK>* hsk_in,
40 const std::vector<ModuleBase::Vector3<double>>& kvec_d_in,
43 const UnitCell* ucell_in,
44 const std::vector<double>& orb_cutoff,
45 const Grid_Driver* GridD_in,
46 const int& nspin)
47 : GK(GK_in), orb_cutoff_(orb_cutoff), pot(pot_in), ucell(ucell_in),
48 gd(GridD_in), OperatorLCAO<TK, TR>(hsk_in, kvec_d_in, hR_in)
49 {
50 this->cal_type = calculation_type::lcao_gint;
51
52 this->initialize_HR(ucell_in, GridD_in);
53#ifdef __OLD_GINT
54 GK_in->initialize_pvpR(*ucell_in, GridD_in, nspin);
55#endif
56 }
62 HS_Matrix_K<TK>* hsk_in,
63 const std::vector<ModuleBase::Vector3<double>>& kvec_d_in,
66 const UnitCell* ucell_in,
67 const std::vector<double>& orb_cutoff,
68 const Grid_Driver* GridD_in,
69 const int& nspin)
70 : GG(GG_in), orb_cutoff_(orb_cutoff), pot(pot_in), OperatorLCAO<TK, TR>(hsk_in, kvec_d_in, hR_in)
71 {
72 this->cal_type = calculation_type::lcao_gint;
73 this->initialize_HR(ucell_in, GridD_in);
74#ifdef __OLD_GINT
75 GG_in->initialize_pvpR(*ucell_in, GridD_in, nspin);
76#endif
77 }
78
80
87 virtual void contributeHR() override;
88
91
92private:
93 // used for k-dependent grid integration.
94 Gint_k* GK = nullptr;
95
96 // used for gamma only algorithms.
97 Gint_Gamma* GG = nullptr;
98
99 std::vector<double> orb_cutoff_;
100
101 // Charge calculating method in LCAO base and contained grid base calculation: DM_R, DM, pvpR_reduced
102
103 elecstate::Potential* pot = nullptr;
104
105 int nspin = 1;
106
112 void initialize_HR(const UnitCell* ucell_in, const Grid_Driver* GridD_in);
113};
114
115} // namespace hamilt
116#endif
Definition gint_gamma.h:23
Definition gint_k.h:13
Definition sltk_grid_driver.h:43
Definition unitcell.h:16
Definition potential_new.h:48
Definition hcontainer.h:144
Definition hs_matrix_k.hpp:11
Definition operator_lcao.h:12
const Grid_Driver * gd
Definition veff_lcao.h:90
const UnitCell * ucell
Definition veff_lcao.h:89
virtual void contributeHR() override
contributeHR() is used to calculate the HR matrix <phi_{\mu, 0}|V_{eff}|phi_{\nu, R}> the contributio...
std::vector< double > orb_cutoff_
Definition veff_lcao.h:99
Definition veff_lcao.h:20
#define T
Definition exp.cpp:237
Definition hamilt.h:12