21 #ifndef _libint2_src_bin_libint_r1dotr2g121111_h_ 22 #define _libint2_src_bin_libint_r1dotr2g121111_h_ 25 #include <integral_11_11.h> 36 typedef GenIntegralSet_11_11<CGF,R1dotR1_G12,EmptySet> R1dotR1G12_11_11_int;
44 public GenIntegralSet< R1dotR2_G12, IncableBFSet, typename DefaultTwoPBraket<BFS>::Result, typename DefaultTwoPBraket<BFS>::Result, EmptySet >
47 typedef BFS BasisFunctionType;
48 typedef R1dotR2_G12 OperType;
61 typedef typename parent_type::key_type key_type;
68 static const SafePtr<R1dotR2G12_11_11> Instance(
const BFS& bra0,
const BFS& ket0,
const BFS& bra1,
const BFS& ket1);
75 #if OVERLOAD_GENINTEGRALSET_LABEL 76 const std::string& label()
const;
88 bool this_precomputed()
const;
89 #if OVERLOAD_GENINTEGRALSET_LABEL 90 mutable std::string label_;
95 #if USE_INT_KEY_TO_HASH 100 # error "USE_INT_KEY_TO_HASH must be set" 105 parent_type(R1dotR2_G12(),bra, ket, aux)
108 throw std::runtime_error(
"R1dotR2G12_11_11<BFS>::R1dotR2G12_11_11(bra,ket) -- number of BFSs in bra for particle 0 must be 1");
110 throw std::runtime_error(
"R1dotR2G12_11_11<BFS>::R1dotR2G12_11_11(bra,ket) -- number of BFSs in bra for particle 1 must be 1");
112 throw std::runtime_error(
"R1dotR2G12_11_11<BFS>::R1dotR2G12_11_11(bra,ket) -- number of BFSs in ket for particle 0 must be 1");
114 throw std::runtime_error(
"R1dotR2G12_11_11<BFS>::R1dotR2G12_11_11(bra,ket) -- number of BFSs in ket for particle 1 must be 1");
116 std::cout <<
"R1dotR2G12_11_11: constructed " << this->
label() << std::endl;
121 R1dotR2G12_11_11<BFS>::~R1dotR2G12_11_11()
124 std::cout <<
"R1dotR2G12_11_11: destructed " << this->label() << std::endl;
129 const SafePtr< R1dotR2G12_11_11<BFS> >
132 typedef typename SingletonManagerType::value_type map_value_type;
133 key_type key = compute_key(OperType(),bra,ket,aux);
134 const map_value_type& val = singl_manager_.find(key);
138 const typename SingletonManagerType::value_type& val = singl_manager_.find(this_int);
139 val.second->instid_ = val.first;
146 const SafePtr< R1dotR2G12_11_11<BFS> >
151 BFSRef bra0_ref(bra0);
152 BFSRef bra1_ref(bra1);
153 BFSRef ket0_ref(ket0);
154 BFSRef ket1_ref(ket1);
156 typedef SafePtr<BFS> BFSRef;
157 BFSRef bra0_ref(
new BFS(bra0));
158 BFSRef bra1_ref(
new BFS(bra1));
159 BFSRef ket0_ref(
new BFS(ket0));
160 BFSRef ket1_ref(
new BFS(ket1));
162 vector<BFSRef> vbra0; vbra0.push_back(bra0_ref);
163 vector<BFSRef> vbra1; vbra1.push_back(bra1_ref);
164 vector<BFSRef> vket0; vket0.push_back(ket0_ref);
165 vector<BFSRef> vket1; vket1.push_back(ket1_ref);
166 vector< vector<BFSRef> > vvbra; vvbra.push_back(vbra0); vvbra.push_back(vbra1);
167 vector< vector<BFSRef> > vvket; vvket.push_back(vket0); vvket.push_back(vket1);
170 AuxIndexType aux(vector<int>(0));
171 return Instance(bra,ket,aux);
178 return parent_type::PtrComp::equiv(static_cast<const parent_type*>(
this),a);
181 #if OVERLOAD_GENINTEGRALSET_LABEL 186 if (label_.empty()) {
188 os <<
"(" << parent_type::bra_.member(0,0)->label() <<
" " 189 << parent_type::ket_.member(0,0)->label()
190 <<
" | r_1.r_2 * G12 | " 191 << parent_type::bra_.member(1,0)->label() <<
" " 192 << parent_type::ket_.member(1,0)->label() <<
")";
208 typedef R1dotR2G12_11_11<CGF> R1dotR2G12_11_11_int;
GenIntegralSet< OperType, IncableBFSet, BraType, KetType, AuxIndexType > parent_type
This is the immediate parent.
Definition: r1dotr2g12_11_11.h:57
const BraType & bra() const
Obtain const ref to bra.
Definition: integral.h:346
SingletonStack<T,KeyType> helps to implement Singleton-like objects of type T.
Definition: singl_stack.h:43
unsigned int num_members(unsigned int p) const
Returns the number of BFS for particle p.
Definition: braket.h:75
Defaults definitions for various parameters assumed by Libint.
Definition: algebra.cc:24
GenIntegralSet is a set of integrals over functions derived from BFS.
Definition: integral.h:91
SingletonStack< R1dotR2G12_11_11, key_type > SingletonManagerType
This the type of the object that manages GenIntegralSet's as Singletons.
Definition: r1dotr2g12_11_11.h:63
const KetType & ket() const
Obtain const ref to bra.
Definition: integral.h:353
Generic integral over a two-body operator with one bfs for each particle in bra and ket.
Definition: integral_11_11.h:33
QuantumNumbersA<T,N> is a set of N quantum numbers of type T implemented in terms of a C-style array.
Definition: quanta.h:200
PtrEquiv<T> provides a set of comparison functions named 'equiv' which take as arguments a mix of ref...
Definition: equiv.h:36
Definition: integral_decl.h:42
PtrEquiv< this_type > PtrComp
This class provides comparison operations on pointers.
Definition: r1dotr2g12_11_11.h:59
GenIntegralSet_11_11< CGShell, R1dotR2_G12, EmptySet > R1dotR2G12_11_11_sq
the following typedefs are useful
Definition: r1dotr2g12_11_11.h:39
R1dotR2G12_11_11< typename BFS::iter_type > iter_type
R1dotR2G12_11_11 is a set of these subobjects.
Definition: r1dotr2g12_11_11.h:55
R1dotR1G12_11_11< CGShell > R1dotR1G12_11_11_sq
the following typedefs are useful
Definition: r1dotr1g12_11_11.h:199
const std::string & label() const
Specialization of GenIntegralSet::label()
Definition: r1dotr2g12_11_11.h:184
ArrayBraket is a lightweight implementation of Braket concept.
Definition: braket.h:38
bool operator==(const this_type &) const
Comparison operator.
Definition: r1dotr2g12_11_11.h:176