11#include <unordered_map>
17#ifndef __NONLOCALNEWTEMPLATE
18#define __NONLOCALNEWTEMPLATE
39template <
typename TK,
typename TR>
44 const std::vector<ModuleBase::Vector3<double>>& kvec_d_in,
47 const std::vector<double>& orb_cutoff,
59 const bool cal_stress,
168 const std::unordered_map<
int, std::vector<double>>& nlm1_all,
169 const std::unordered_map<
int, std::vector<double>>& nlm2_all,
181 const std::unordered_map<
int, std::vector<double>>& nlm1_all,
182 const std::unordered_map<
int, std::vector<double>>& nlm2_all,
193 const std::unordered_map<
int, std::vector<double>>& nlm1_all,
194 const std::unordered_map<
int, std::vector<double>>& nlm2_all,
Grid_Driver class for neighbor search interface.
Definition sltk_grid_driver.h:63
3 elements vector
Definition vector3.h:21
Definition parallel_orbitals.h:16
A class to compute two-center integrals.
Definition two_center_integrator.h:35
Provide the basic information about unitcell.
Definition unitcell.h:16
Definition base_matrix.h:20
Definition hcontainer.h:147
Definition hs_matrix_k.h:12
void cal_dH(std::array< std::vector< hamilt::HContainer< double > * >, 3 > &dhR)
Calculate the derivative of the non-local pseudopotential Hamiltonian with respect to atomic displace...
Definition nonlocal_dh.cpp:12
std::vector< AdjacentAtomInfo > adjs_all
Definition nonlocal.h:200
Nonlocal(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 std::vector< double > &orb_cutoff, const Grid_Driver *GridD_in, const TwoCenterIntegrator *intor)
Definition nonlocal.cpp:16
hamilt::HContainer< TR > * HR_fixed
Definition nonlocal.h:138
bool allocated
Definition nonlocal.h:143
const TwoCenterIntegrator * intor_
Definition nonlocal.h:141
std::vector< double > orb_cutoff_
Definition nonlocal.h:136
const UnitCell * ucell
Definition nonlocal.h:134
void initialize_HR(const Grid_Driver *GridD_in)
initialize HR, search the nearest neighbor atoms HContainer is used to store the non-local pseudopote...
Definition nonlocal.cpp:51
bool HR_fixed_done
Definition nonlocal.h:145
void calculate_HR()
calculate the non-local pseudopotential matrix with specific <I,J,R> atom-pairs nearest neighbor atom...
Definition nonlocal.cpp:121
virtual void contributeHR() override
contributeHR() is used to calculate the HR matrix <phi_{\mu, 0}|beta_p1>D_{p1, p2}...
Definition nonlocal.cpp:298
const Grid_Driver * gridD
Definition nonlocal.h:172
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 ...
Definition nonlocal.cpp:290
void cal_HR_IJR(const int &iat1, const int &iat2, const int &T0, const Parallel_Orbitals *paraV, const std::unordered_map< int, std::vector< double > > &nlm1_all, const std::unordered_map< int, std::vector< double > > &nlm2_all, TR *data_pointer)
calculate the HR local matrix of <I,J,R> atom pair
Definition nonlocal.cpp:230
void cal_force_stress(const bool cal_force, const bool cal_stress, const HContainer< TR > *dmR, ModuleBase::matrix &force, ModuleBase::matrix &stress)
Definition nonlocal_fs.cpp:10
void cal_force_IJR(const int &iat1, const int &iat2, const int &T0, const Parallel_Orbitals *paraV, const std::unordered_map< int, std::vector< double > > &nlm1_all, const std::unordered_map< int, std::vector< double > > &nlm2_all, const hamilt::BaseMatrix< std::complex< double > > *dmR_pointer, double *force1, double *force2)
Definition nonlocal_fs.cpp:221
void cal_stress_IJR(const int &iat1, const int &iat2, const int &T0, const Parallel_Orbitals *paraV, const std::unordered_map< int, std::vector< double > > &nlm1_all, const std::unordered_map< int, std::vector< double > > &nlm2_all, const hamilt::BaseMatrix< std::complex< double > > *dmR_pointer, const ModuleBase::Vector3< double > &dis1, const ModuleBase::Vector3< double > &dis2, double *stress)
Definition nonlocal_fs.cpp:286
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
#define T
Definition exp.cpp:237
Grid_Driver class for neighbor search interface.