21 #ifndef _libint2_src_bin_libint_r1dotr1g121111_h_ 22 #define _libint2_src_bin_libint_r1dotr1g121111_h_ 35 template <
class BFS>
class R1dotR1G12_11_11 :
36 public GenIntegralSet< R1dotR1_G12, IncableBFSet, typename DefaultTwoPBraket<BFS>::Result, typename DefaultTwoPBraket<BFS>::Result, EmptySet >
39 typedef BFS BasisFunctionType;
40 typedef R1dotR1_G12 OperType;
41 typedef typename DefaultTwoPBraket<BFS>::Result BraType;
42 typedef typename DefaultTwoPBraket<BFS>::Result KetType;
44 typedef R1dotR1G12_11_11<BFS> this_type;
53 typedef typename parent_type::key_type key_type;
60 static const SafePtr<R1dotR1G12_11_11> Instance(
const BFS& bra0,
const BFS& ket0,
const BFS& bra1,
const BFS& ket1);
67 #if OVERLOAD_GENINTEGRALSET_LABEL 68 const std::string& label()
const;
80 bool this_precomputed()
const;
81 #if OVERLOAD_GENINTEGRALSET_LABEL 82 mutable std::string label_;
87 #if USE_INT_KEY_TO_HASH 92 # error "USE_INT_KEY_TO_HASH must be set" 97 parent_type(R1dotR1_G12(),bra, ket, aux)
100 throw std::runtime_error(
"R1dotR1G12_11_11<BFS>::R1dotR1G12_11_11(bra,ket) -- number of BFSs in bra for particle 0 must be 1");
102 throw std::runtime_error(
"R1dotR1G12_11_11<BFS>::R1dotR1G12_11_11(bra,ket) -- number of BFSs in bra for particle 1 must be 1");
104 throw std::runtime_error(
"R1dotR1G12_11_11<BFS>::R1dotR1G12_11_11(bra,ket) -- number of BFSs in ket for particle 0 must be 1");
106 throw std::runtime_error(
"R1dotR1G12_11_11<BFS>::R1dotR1G12_11_11(bra,ket) -- number of BFSs in ket for particle 1 must be 1");
108 std::cout <<
"R1dotR1G12_11_11: constructed " << this->
label() << std::endl;
113 R1dotR1G12_11_11<BFS>::~R1dotR1G12_11_11()
116 std::cout <<
"R1dotR1G12_11_11: destructed " << this->label() << std::endl;
121 const SafePtr< R1dotR1G12_11_11<BFS> >
124 typedef typename SingletonManagerType::value_type map_value_type;
125 key_type key = compute_key(OperType(),bra,ket,aux);
126 const map_value_type& val = singl_manager_.find(key);
130 const typename SingletonManagerType::value_type& val = singl_manager_.find(this_int);
131 val.second->instid_ = val.first;
138 const SafePtr< R1dotR1G12_11_11<BFS> >
143 BFSRef bra0_ref(bra0);
144 BFSRef bra1_ref(bra1);
145 BFSRef ket0_ref(ket0);
146 BFSRef ket1_ref(ket1);
148 typedef SafePtr<BFS> BFSRef;
149 BFSRef bra0_ref(
new BFS(bra0));
150 BFSRef bra1_ref(
new BFS(bra1));
151 BFSRef ket0_ref(
new BFS(ket0));
152 BFSRef ket1_ref(
new BFS(ket1));
154 vector<BFSRef> vbra0; vbra0.push_back(bra0_ref);
155 vector<BFSRef> vbra1; vbra1.push_back(bra1_ref);
156 vector<BFSRef> vket0; vket0.push_back(ket0_ref);
157 vector<BFSRef> vket1; vket1.push_back(ket1_ref);
158 vector< vector<BFSRef> > vvbra; vvbra.push_back(vbra0); vvbra.push_back(vbra1);
159 vector< vector<BFSRef> > vvket; vvket.push_back(vket0); vvket.push_back(vket1);
162 AuxIndexType aux(vector<int>(0));
163 return Instance(bra,ket,aux);
170 return parent_type::PtrComp::equiv(static_cast<const parent_type*>(
this),a);
173 #if OVERLOAD_GENINTEGRALSET_LABEL 178 if (label_.empty()) {
180 os <<
"(" << parent_type::bra_.member(0,0)->label() <<
" " 181 << parent_type::ket_.member(0,0)->label()
182 <<
" | r_1^2 * G12 | " 183 << parent_type::bra_.member(1,0)->label() <<
" " 184 << parent_type::ket_.member(1,0)->label() <<
")";
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
R1dotR1G12_11_11 – integral over R1dotR1_G12 operator with one bfs for each particle in bra and ket.
Definition: integral_decl.h:40
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
const std::string & label() const
Specialization of GenIntegralSet::label()
Definition: r1dotr1g12_11_11.h:176
PtrEquiv< this_type > PtrComp
This class provides comparison operations on pointers.
Definition: r1dotr1g12_11_11.h:51
const KetType & ket() const
Obtain const ref to bra.
Definition: integral.h:353
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
SingletonStack< R1dotR1G12_11_11, key_type > SingletonManagerType
This the type of the object that manages GenIntegralSet's as Singletons.
Definition: r1dotr1g12_11_11.h:55
PtrEquiv<T> provides a set of comparison functions named 'equiv' which take as arguments a mix of ref...
Definition: equiv.h:36
bool operator==(const this_type &) const
Comparison operator.
Definition: r1dotr1g12_11_11.h:168
GenIntegralSet< OperType, IncableBFSet, BraType, KetType, AuxIndexType > parent_type
This is the immediate parent.
Definition: r1dotr1g12_11_11.h:49
R1dotR1G12_11_11< CGShell > R1dotR1G12_11_11_sq
the following typedefs are useful
Definition: r1dotr1g12_11_11.h:199
ArrayBraket is a lightweight implementation of Braket concept.
Definition: braket.h:38
R1dotR1G12_11_11< typename BFS::iter_type > iter_type
R1dotR1G12_11_11 is a set of these subobjects.
Definition: r1dotr1g12_11_11.h:47
DefaultQuantumNumbers< int, 0 >::Result EmptySet
EmptySet is the type that describes null set of auxiliary indices.
Definition: quanta.h:407