21#ifndef _libint2_src_bin_libint_r1dotr2g121111_h_
22#define _libint2_src_bin_libint_r1dotr2g121111_h_
25#include <integral_11_11.h>
34 typedef GenIntegralSet_11_11<CGF,R1dotR1_G12,EmptySet> R1dotR1G12_11_11_int;
42 public GenIntegralSet< R1dotR2_G12, IncableBFSet, typename DefaultTwoPBraket<BFS>::Result, typename DefaultTwoPBraket<BFS>::Result, EmptySet >
45 typedef BFS BasisFunctionType;
46 typedef R1dotR2_G12 OperType;
59 typedef typename parent_type::key_type key_type;
66 static const SafePtr<R1dotR2G12_11_11> Instance(
const BFS& bra0,
const BFS& ket0,
const BFS& bra1,
const BFS& ket1);
73#if OVERLOAD_GENINTEGRALSET_LABEL
75 const std::string&
label()
const;
86 bool this_precomputed()
const;
87#if OVERLOAD_GENINTEGRALSET_LABEL
88 mutable std::string label_;
93#if USE_INT_KEY_TO_HASH
98# error "USE_INT_KEY_TO_HASH must be set"
103 parent_type(R1dotR2_G12(),bra, ket, aux)
106 throw std::runtime_error(
"R1dotR2G12_11_11<BFS>::R1dotR2G12_11_11(bra,ket) -- number of BFSs in bra for particle 0 must be 1");
108 throw std::runtime_error(
"R1dotR2G12_11_11<BFS>::R1dotR2G12_11_11(bra,ket) -- number of BFSs in bra for particle 1 must be 1");
110 throw std::runtime_error(
"R1dotR2G12_11_11<BFS>::R1dotR2G12_11_11(bra,ket) -- number of BFSs in ket for particle 0 must be 1");
112 throw std::runtime_error(
"R1dotR2G12_11_11<BFS>::R1dotR2G12_11_11(bra,ket) -- number of BFSs in ket for particle 1 must be 1");
114 std::cout <<
"R1dotR2G12_11_11: constructed " << this->
label() << std::endl;
119 R1dotR2G12_11_11<BFS>::~R1dotR2G12_11_11()
122 std::cout <<
"R1dotR2G12_11_11: destructed " << this->label() << std::endl;
127 const SafePtr< R1dotR2G12_11_11<BFS> >
130 typedef typename SingletonManagerType::value_type map_value_type;
131 key_type key = compute_key(OperType(),bra,ket,aux);
132 const map_value_type& val = singl_manager_.find(key);
136 const typename SingletonManagerType::value_type& val = singl_manager_.find(this_int);
137 val.second->instid_ = val.first;
144 const SafePtr< R1dotR2G12_11_11<BFS> >
149 BFSRef bra0_ref(bra0);
150 BFSRef bra1_ref(bra1);
151 BFSRef ket0_ref(ket0);
152 BFSRef ket1_ref(ket1);
154 typedef SafePtr<BFS> BFSRef;
155 BFSRef bra0_ref(
new BFS(bra0));
156 BFSRef bra1_ref(
new BFS(bra1));
157 BFSRef ket0_ref(
new BFS(ket0));
158 BFSRef ket1_ref(
new BFS(ket1));
160 std::vector<BFSRef> vbra0; vbra0.push_back(bra0_ref);
161 std::vector<BFSRef> vbra1; vbra1.push_back(bra1_ref);
162 std::vector<BFSRef> vket0; vket0.push_back(ket0_ref);
163 std::vector<BFSRef> vket1; vket1.push_back(ket1_ref);
164 std::vector< std::vector<BFSRef> > vvbra; vvbra.push_back(vbra0); vvbra.push_back(vbra1);
165 std::vector< std::vector<BFSRef> > vvket; vvket.push_back(vket0); vvket.push_back(vket1);
168 AuxIndexType aux(std::vector<int>(0));
169 return Instance(bra,ket,aux);
176 return parent_type::PtrComp::equiv(
static_cast<const parent_type*
>(
this),a);
179#if OVERLOAD_GENINTEGRALSET_LABEL
184 if (label_.empty()) {
186 os <<
"(" << parent_type::bra_.member(0,0)->label() <<
" "
187 << parent_type::ket_.member(0,0)->label()
188 <<
" | r_1.r_2 * G12 | "
189 << parent_type::bra_.member(1,0)->label() <<
" "
190 << parent_type::ket_.member(1,0)->label() <<
")";
206 typedef R1dotR2G12_11_11<CGF> R1dotR2G12_11_11_int;
ArrayBraket is a lightweight implementation of Braket concept.
Definition: src/bin/libint/braket.h:38
unsigned int num_members(unsigned int p) const
Returns the number of BFS for particle p.
Definition: src/bin/libint/braket.h:75
Generic integral over a two-body operator with one bfs for each particle in bra and ket.
Definition: integral_11_11.h:33
GenIntegralSet is a set of integrals over functions derived from BFS.
Definition: integral.h:92
const BraType & bra() const
Obtain const ref to bra.
Definition: integral.h:344
const KetType & ket() const
Obtain const ref to bra.
Definition: integral.h:351
const SafePtr< EmptySet > aux() const
Obtain the auxiliary quanta.
Definition: integral.h:365
PtrEquiv<T> provides a set of comparison functions named 'equiv' which take as arguments a mix of ref...
Definition: equiv.h:36
QuantumNumbersA<T,N> is a set of N quantum numbers of type T implemented in terms of a C-style array.
Definition: quanta.h:197
Definition: r1dotr2g12_11_11.h:43
bool operator==(const this_type &) const
Comparison operator.
Definition: r1dotr2g12_11_11.h:174
const std::string & label() const
Specialization of GenIntegralSet::label()
Definition: r1dotr2g12_11_11.h:182
PtrEquiv< this_type > PtrComp
This class provides comparison operations on pointers.
Definition: r1dotr2g12_11_11.h:57
SingletonStack< R1dotR2G12_11_11, key_type > SingletonManagerType
This the type of the object that manages GenIntegralSet's as Singletons.
Definition: r1dotr2g12_11_11.h:61
R1dotR2G12_11_11< typename BFS::iter_type > iter_type
R1dotR2G12_11_11 is a set of these subobjects.
Definition: r1dotr2g12_11_11.h:53
GenIntegralSet< OperType, IncableBFSet, BraType, KetType, AuxIndexType > parent_type
This is the immediate parent.
Definition: r1dotr2g12_11_11.h:55
SingletonStack<T,KeyType> helps to implement Singleton-like objects of type T.
Definition: singl_stack.h:44
Defaults definitions for various parameters assumed by Libint.
Definition: algebra.cc:24
GenIntegralSet_11_11< CGShell, R1dotR2_G12, EmptySet > R1dotR2G12_11_11_sq
the following typedefs are useful
Definition: r1dotr2g12_11_11.h:37
R1dotR1G12_11_11< CGShell > R1dotR1G12_11_11_sq
the following typedefs are useful
Definition: r1dotr1g12_11_11.h:197
GenIntegralSet_11_11< CGShell, R2dotR2_G12, EmptySet > R2dotR2G12_11_11_sq
the following typedefs are useful
Definition: r1dotr2g12_11_11.h:35