6#ifndef MATRIX_ORB11_HPP
7#define MATRIX_ORB11_HPP
13template<
typename Tdata>
25 const size_t sizeA = index_A[TA].count_size;
26 const size_t sizeB = index_B[TB].count_size;
31 default:
throw std::invalid_argument(std::string(__FILE__)+
" line "+std::to_string(__LINE__));
36 const int LA = co3.first;
37 for(
const auto &co4 : co3.second )
39 const size_t NA = co4.first;
40 for(
size_t MA=0; MA!=2*LA+1; ++MA )
42 for(
const auto &co5 : co4.second )
44 const int LB = co5.first;
45 for(
const auto &co6 : co5.second )
47 const size_t NB = co6.first;
48 for(
size_t MB=0; MB!=2*LB+1; ++MB )
50 const Tdata overlap = co6.second.cal_overlap( tauA*
lat0, tauB*
lat0, MA, MB );
51 const size_t iA = index_A[TA][LA][NA][MA];
52 const size_t iB = index_B[TB][LB][NB][MB];
57 default:
throw std::invalid_argument(std::string(__FILE__)+
" line "+std::to_string(__LINE__));
68template<
typename Tdata>
78 std::array<RI::Tensor<Tdata>,3> m;
80 const size_t sizeA = index_A[TA].count_size;
81 const size_t sizeB = index_B[TB].count_size;
82 for(
int i=0; i<m.size(); ++i)
88 default:
throw std::invalid_argument(std::string(__FILE__)+
" line "+std::to_string(__LINE__));
94 const int LA = co3.first;
95 for(
const auto &co4 : co3.second )
97 const size_t NA = co4.first;
98 for(
size_t MA=0; MA!=2*LA+1; ++MA )
100 for(
const auto &co5 : co4.second )
102 const int LB = co5.first;
103 for(
const auto &co6 : co5.second )
105 const size_t NB = co6.first;
106 for(
size_t MB=0; MB!=2*LB+1; ++MB )
109 const size_t iA = index_A[TA][LA][NA][MA];
110 const size_t iB = index_B[TB][LB][NB][MB];
111 for(
size_t i=0; i<m.size(); ++i)
117 default:
throw std::invalid_argument(std::string(__FILE__)+
" line "+std::to_string(__LINE__));
129template <
typename Tdata>
137 std::map<size_t,std::map<size_t,std::map<size_t,std::map<size_t,RI::Tensor<Tdata>>>>> matrixes;
141 const size_t TA = co1.first;
142 for (
size_t IA=0; IA!=ucell.
atoms[TA].
na; ++IA)
146 for(
const auto &co2 : co1.second )
148 const size_t TB = co2.first;
149 for (
size_t IB=0; IB!=ucell.
atoms[TB].
na; ++IB)
153 matrixes[TA][IA][TB][IB] = cal_overlap_matrix<Tdata>( TA, TB, tauA, tauB, index_r, index_c,
Matrix_Order::AB );
int na
Definition atom_spec.h:28
std::vector< ModuleBase::Vector3< double > > tau
Definition atom_spec.h:36
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:83
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:130
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:14
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:69
double * lat0
Definition Matrix_Orbs11.h:75
Matrix_Order
Definition Matrix_Orbs11.h:43
std::vector< Index_T > IndexLNM
Definition element_basis_index.h:41
3 elements vector
Definition vector3.h:22
Atom * atoms
Definition unitcell.h:18
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