ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
td_nonlocal_lcao.h
Go to the documentation of this file.
1#ifndef TDNONLOCAL_H
2#define TDNONLOCAL_H
8
9#include <unordered_map>
10
11namespace hamilt
12{
13
14#ifndef __TD_NONLOCALTEMPLATE
15#define __TD_NONLOCALTEMPLATE
16
19template <class T>
20class TDNonlocal : public T
21{
22};
23
24#endif
25
31template <typename TK, typename TR>
32class TDNonlocal<OperatorLCAO<TK, TR>> : public OperatorLCAO<TK, TR>
33{
34 public:
36 const std::vector<ModuleBase::Vector3<double>>& kvec_d_in,
38 const UnitCell* ucell_in,
39 const LCAO_Orbitals& orb,
40 const Grid_Driver* GridD_in,
41 TD_info& td_info);
43
48 virtual void contributeHR() override;
49 virtual void contributeHk(int ik) override;
50
51 virtual void set_HR_fixed(void*) override;
52
53 private:
54 const UnitCell* ucell = nullptr;
56
57 HContainer<TR>* HR = nullptr;
61 const Grid_Driver* Grid = nullptr;
62
63 bool allocated = false;
64
65 bool hR_tmp_done = false;
66
72 void initialize_HR(const Grid_Driver* GridD_in);
73
80 void update_td();
87
91 void cal_HR_IJR(const int& iat1,
92 const int& iat2,
93 const int& T0,
94 const std::vector<std::unordered_map<int, std::vector<std::complex<double>>>>& nlm1_all,
95 const std::vector<std::unordered_map<int, std::vector<std::complex<double>>>>& nlm2_all,
96 std::complex<double>* data_pointer,
97 std::complex<double>** data_pointer_c);
98
100 std::vector<AdjacentAtomInfo> adjs_all;
103};
104
105} // namespace hamilt
106#endif
Grid_Driver class for neighbor search interface.
Definition sltk_grid_driver.h:63
Definition orb_read.h:18
3 elements vector
Definition vector3.h:21
Definition td_info.h:18
Provide the basic information about unitcell.
Definition unitcell.h:16
Definition hcontainer.h:147
Definition hs_matrix_k.h:12
OperatorLCAO(HS_Matrix_K< TK > *hsk_in, const std::vector< ModuleBase::Vector3< double > > &kvec_d_in, HContainer< TR > *hR_in)
H(R) matrix, R is the Bravis lattice vector.
Definition operator_lcao.h:16
int ik
Definition operator.h:123
virtual void contributeHR() override
contributeHR() is used to calculate the HR matrix <phi_{\mu, 0}|beta_p1>D_{p1, p2}...
bool hR_tmp_done
Definition td_nonlocal_lcao.h:65
HContainer< std::complex< double > > * hR_tmp
Store real space hamiltonian. TD term should include imaginary part, thus it has to be complex type....
Definition td_nonlocal_lcao.h:60
void initialize_HR(const Grid_Driver *GridD_in)
initialize HR, search the nearest neighbor atoms HContainer is used to store the non-local pseudopote...
bool allocated
Definition td_nonlocal_lcao.h:63
void update_td()
init vector potential for td_nonlocal term
void cal_HR_IJR(const int &iat1, const int &iat2, const int &T0, const std::vector< std::unordered_map< int, std::vector< std::complex< double > > > > &nlm1_all, const std::vector< std::unordered_map< int, std::vector< std::complex< double > > > > &nlm2_all, std::complex< double > *data_pointer, std::complex< double > **data_pointer_c)
calculate the HR local matrix of <I,J,R> atom pair
const UnitCell * ucell
Definition td_nonlocal_lcao.h:54
const LCAO_Orbitals & orb_
Definition td_nonlocal_lcao.h:55
ModuleBase::Vector3< double > cart_At
Store the vector potential for td_nonlocal term.
Definition td_nonlocal_lcao.h:102
virtual void set_HR_fixed(void *) override
set_HR_fixed() is used for pass HR_fixed matrix to the next node in sub-chain table not used in base ...
void calculate_HR()
calculate the non-local pseudopotential matrix with specific <I,J,R> atom-pairs nearest neighbor atom...
TDNonlocal(HS_Matrix_K< TK > *hsk_in, const std::vector< ModuleBase::Vector3< double > > &kvec_d_in, hamilt::HContainer< TR > *hR_in, const UnitCell *ucell_in, const LCAO_Orbitals &orb, const Grid_Driver *GridD_in, TD_info &td_info)
std::vector< AdjacentAtomInfo > adjs_all
exact the nearest neighbor atoms from all adjacent atoms
Definition td_nonlocal_lcao.h:100
HContainer< TR > * HR
Definition td_nonlocal_lcao.h:57
void initialize_HR_tmp()
initialize HR_tmp Allocate the memory for HR_tmp with the same size as HR
virtual void contributeHk(int ik) override
Definition td_nonlocal_lcao.h:21
#define T
Definition exp.cpp:237
Definition batch.h:6
Definition wf_op.cpp:6
Grid_Driver class for neighbor search interface.