6#ifndef MATRIX_ORB11_HPP
7#define MATRIX_ORB11_HPP
12template<
typename Tdata>
24 const size_t sizeA = index_A[TA].count_size;
25 const size_t sizeB = index_B[TB].count_size;
30 default:
throw std::invalid_argument(std::string(__FILE__)+
" line "+std::to_string(__LINE__));
35 const int LA = co3.first;
36 for(
const auto &co4 : co3.second )
38 const size_t NA = co4.first;
39 for(
size_t MA=0; MA!=2*LA+1; ++MA )
41 for(
const auto &co5 : co4.second )
43 const int LB = co5.first;
44 for(
const auto &co6 : co5.second )
46 const size_t NB = co6.first;
47 for(
size_t MB=0; MB!=2*LB+1; ++MB )
49 const Tdata overlap = co6.second.cal_overlap( tauA*
lat0, tauB*
lat0, MA, MB );
50 const size_t iA = index_A[TA][LA][NA][MA];
51 const size_t iB = index_B[TB][LB][NB][MB];
56 default:
throw std::invalid_argument(std::string(__FILE__)+
" line "+std::to_string(__LINE__));
67template<
typename Tdata>
77 std::array<RI::Tensor<Tdata>,3> m;
79 const size_t sizeA = index_A[TA].count_size;
80 const size_t sizeB = index_B[TB].count_size;
81 for(
int i=0;
i<m.size(); ++
i)
87 default:
throw std::invalid_argument(std::string(__FILE__)+
" line "+std::to_string(__LINE__));
93 const int LA = co3.first;
94 for(
const auto &co4 : co3.second )
96 const size_t NA = co4.first;
97 for(
size_t MA=0; MA!=2*LA+1; ++MA )
99 for(
const auto &co5 : co4.second )
101 const int LB = co5.first;
102 for(
const auto &co6 : co5.second )
104 const size_t NB = co6.first;
105 for(
size_t MB=0; MB!=2*LB+1; ++MB )
108 const size_t iA = index_A[TA][LA][NA][MA];
109 const size_t iB = index_B[TB][LB][NB][MB];
110 for(
size_t i=0;
i<m.size(); ++
i)
116 default:
throw std::invalid_argument(std::string(__FILE__)+
" line "+std::to_string(__LINE__));
128template <
typename Tdata>
136 std::map<size_t,std::map<size_t,std::map<size_t,std::map<size_t,RI::Tensor<Tdata>>>>> matrixes;
140 const size_t TA = co1.first;
141 for (
size_t IA=0; IA!=ucell.
atoms[TA].
na; ++IA)
145 for(
const auto &co2 : co1.second )
147 const size_t TB = co2.first;
148 for (
size_t IB=0; IB!=ucell.
atoms[TB].
na; ++IB)
152 matrixes[TA][IA][TB][IB] = cal_overlap_matrix<Tdata>( TA, TB, tauA, tauB, index_r, index_c,
Matrix_Order::AB );
const std::complex< double > i
Definition cal_pLpR.cpp:46
int na
Definition atom_spec.h:27
std::vector< ModuleBase::Vector3< double > > tau
Definition atom_spec.h:35
std::map< size_t, std::map< size_t, std::map< int, std::map< size_t, std::map< int, std::map< size_t, Center2_Orb::Orb11 > > > > > > center2_orb11_s
Definition Matrix_Orbs11.h:77
std::map< size_t, std::map< size_t, std::map< size_t, std::map< size_t, RI::Tensor< Tdata > > > > > cal_overlap_matrix_all(const UnitCell &ucell, const ModuleBase::Element_Basis_Index::IndexLNM &index_r, const ModuleBase::Element_Basis_Index::IndexLNM &index_c) const
Definition Matrix_Orbs11.hpp:129
RI::Tensor< Tdata > cal_overlap_matrix(const size_t TA, const size_t TB, const ModuleBase::Vector3< double > &tauA, const ModuleBase::Vector3< double > &tauB, const ModuleBase::Element_Basis_Index::IndexLNM &index_A, const ModuleBase::Element_Basis_Index::IndexLNM &index_B, const Matrix_Order &matrix_order) const
Definition Matrix_Orbs11.hpp:13
std::array< RI::Tensor< Tdata >, 3 > cal_grad_overlap_matrix(const size_t TA, const size_t TB, const ModuleBase::Vector3< double > &tauA, const ModuleBase::Vector3< double > &tauB, const ModuleBase::Element_Basis_Index::IndexLNM &index_A, const ModuleBase::Element_Basis_Index::IndexLNM &index_B, const Matrix_Order &matrix_order) const
Definition Matrix_Orbs11.hpp:68
double * lat0
Definition Matrix_Orbs11.h:69
Matrix_Order
Definition Matrix_Orbs11.h:35
3 elements vector
Definition vector3.h:24
Atom * atoms
Definition unitcell.h:45
std::vector< Index_T > IndexLNM
Definition element_basis_index.h:42
void TITLE(const std::string &class_name, const std::string &function_name, const bool disable)
Definition tool_title.cpp:18
std::array< Tcell, 3 > Vector3_to_array3(const ModuleBase::Vector3< Tcell > &v)
Definition RI_Util.h:32