26 const size_t sizeA1 = index_A1[TA].count_size;
27 const size_t sizeA2 = index_A2[TA].count_size;
28 const size_t sizeB = index_B[TB].count_size;
37 default:
throw std::invalid_argument(std::string(__FILE__)+
" line "+std::to_string(__LINE__));
42 const int LA1 = co3.first;
43 for(
const auto &co4 : co3.second )
45 const size_t NA1 = co4.first;
46 for(
size_t MA1=0; MA1!=2*LA1+1; ++MA1 )
48 for(
const auto &co5 : co4.second )
50 const int LA2 = co5.first;
51 for(
const auto &co6 : co5.second )
53 const size_t NA2 = co6.first;
54 for(
size_t MA2=0; MA2!=2*LA2+1; ++MA2 )
56 for(
const auto &co7 : co6.second )
58 const int LB = co7.first;
59 for(
const auto &co8 : co7.second )
61 const size_t NB = co8.first;
62 for(
size_t MB=0; MB!=2*LB+1; ++MB )
64 const Tdata overlap = co8.second.cal_overlap( tauA*
lat0, tauB*
lat0, MA1, MA2, MB );
65 const size_t iA1 = index_A1[TA][LA1][NA1][MA1];
66 const size_t iA2 = index_A2[TA][LA2][NA2][MA2];
67 const size_t iB = index_B[TB][LB][NB][MB];
76 default:
throw std::invalid_argument(std::string(__FILE__)+
" line "+std::to_string(__LINE__));
101 std::array<RI::Tensor<Tdata>,3> m;
103 const size_t sizeA1 = index_A1[TA].count_size;
104 const size_t sizeA2 = index_A2[TA].count_size;
105 const size_t sizeB = index_B[TB].count_size;
106 for(
int i=0; i<m.size(); ++i)
116 default:
throw std::invalid_argument(std::string(__FILE__)+
" line "+std::to_string(__LINE__));
122 const int LA1 = co3.first;
123 for(
const auto &co4 : co3.second )
125 const size_t NA1 = co4.first;
126 for(
size_t MA1=0; MA1!=2*LA1+1; ++MA1 )
128 for(
const auto &co5 : co4.second )
130 const int LA2 = co5.first;
131 for(
const auto &co6 : co5.second )
133 const size_t NA2 = co6.first;
134 for(
size_t MA2=0; MA2!=2*LA2+1; ++MA2 )
136 for(
const auto &co7 : co6.second )
138 const int LB = co7.first;
139 for(
const auto &co8 : co7.second )
141 const size_t NB = co8.first;
142 for(
size_t MB=0; MB!=2*LB+1; ++MB )
145 const size_t iA1 = index_A1[TA][LA1][NA1][MA1];
146 const size_t iA2 = index_A2[TA][LA2][NA2][MA2];
147 const size_t iB = index_B[TB][LB][NB][MB];
148 for(
size_t i=0; i<m.size(); ++i)
158 default:
throw std::invalid_argument(std::string(__FILE__)+
" line "+std::to_string(__LINE__));
182 std::map<size_t,std::map<size_t,std::map<size_t,std::map<size_t,std::vector<RI::Tensor<Tdata>>>>>> matrixes;
186 const size_t TA = co1.first;
187 for(
size_t IA=0; IA!=ucell.
atoms[TA].
na; ++IA )
191 for(
const auto &co2 : co1.second )
193 const size_t TB = co2.first;
194 for(
size_t IB=0; IB!=ucell.
atoms[TB].
na; ++IB )
198 const RI::Tensor<Tdata> &&m = cal_overlap_matrix<Tdata>( TA, TB, tauA, tauB, index_A1, index_A2, index_B,
Matrix_Order::A2BA1 );
199 matrixes[TA][IA][TB][IB].resize(2);
200 matrixes[TA][IA][TB][IB][0] = std::move(m);
201 const RI::Tensor<Tdata> &&n = cal_overlap_matrix<Tdata>( TA, TB, tauA, tauB, index_A1, index_A2, index_B,
Matrix_Order::BA2A1 );
202 matrixes[TB][IB][TA][IA].resize(2);
203 matrixes[TB][IB][TA][IA][1] = std::move(n);
209 for (
auto m1 : matrixes)
211 const size_t T = m1.first;
212 for(
auto m2 : m1.second )
214 const size_t I = m2.first;
215 matrixes[
T][I][
T][I].resize(1);
std::map< size_t, std::map< size_t, std::map< int, std::map< size_t, std::map< int, std::map< size_t, std::map< int, std::map< size_t, Center2_Orb::Orb21 > > > > > > > > center2_orb21_s
Definition Matrix_Orbs21.h:94
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_A1, const ModuleBase::Element_Basis_Index::IndexLNM &index_A2, const ModuleBase::Element_Basis_Index::IndexLNM &index_B, const Matrix_Order &matrix_order) const
Definition Matrix_Orbs21.hpp:91
std::map< size_t, std::map< size_t, std::map< size_t, std::map< size_t, std::vector< RI::Tensor< Tdata > > > > > > cal_overlap_matrix_all(const UnitCell &ucell, const ModuleBase::Element_Basis_Index::IndexLNM &index_A1, const ModuleBase::Element_Basis_Index::IndexLNM &index_A2, const ModuleBase::Element_Basis_Index::IndexLNM &index_B) const
Definition Matrix_Orbs21.hpp:174
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_A1, const ModuleBase::Element_Basis_Index::IndexLNM &index_A2, const ModuleBase::Element_Basis_Index::IndexLNM &index_B, const Matrix_Order &matrix_order) const
Definition Matrix_Orbs21.hpp:14
void TITLE(const std::string &class_name, const std::string &function_name, const bool disable)
Definition tool_title.cpp:18