20 #ifndef _libint2_src_bin_libint_r1dotr2g121111_h_ 21 #define _libint2_src_bin_libint_r1dotr2g121111_h_ 24 #include <integral_11_11.h> 35 typedef GenIntegralSet_11_11<CGF,R1dotR1_G12,EmptySet> R1dotR1G12_11_11_int;
43 public GenIntegralSet< R1dotR2_G12, IncableBFSet, typename DefaultTwoPBraket<BFS>::Result, typename DefaultTwoPBraket<BFS>::Result, EmptySet >
46 typedef BFS BasisFunctionType;
47 typedef R1dotR2_G12 OperType;
60 typedef typename parent_type::key_type key_type;
67 static const SafePtr<R1dotR2G12_11_11> Instance(
const BFS& bra0,
const BFS& ket0,
const BFS& bra1,
const BFS& ket1);
69 static const SafePtr<R1dotR2G12_11_11> Instance(
const BraType& bra,
const KetType& ket,
const AuxIndexType& aux);
73 bool operator==(
const this_type&)
const;
74 #if OVERLOAD_GENINTEGRALSET_LABEL 75 const std::string& label()
const;
81 R1dotR2G12_11_11(
const BraType& bra,
const KetType& ket,
const AuxIndexType& aux);
84 static SingletonManagerType singl_manager_;
87 bool this_precomputed()
const;
88 #if OVERLOAD_GENINTEGRALSET_LABEL 89 mutable std::string label_;
94 #if USE_INT_KEY_TO_HASH 99 # error "USE_INT_KEY_TO_HASH must be set" 107 throw std::runtime_error(
"R1dotR2G12_11_11<BFS>::R1dotR2G12_11_11(bra,ket) -- number of BFSs in bra for particle 0 must be 1");
109 throw std::runtime_error(
"R1dotR2G12_11_11<BFS>::R1dotR2G12_11_11(bra,ket) -- number of BFSs in bra for particle 1 must be 1");
111 throw std::runtime_error(
"R1dotR2G12_11_11<BFS>::R1dotR2G12_11_11(bra,ket) -- number of BFSs in ket for particle 0 must be 1");
113 throw std::runtime_error(
"R1dotR2G12_11_11<BFS>::R1dotR2G12_11_11(bra,ket) -- number of BFSs in ket for particle 1 must be 1");
115 std::cout <<
"R1dotR2G12_11_11: constructed " << this->
label() << std::endl;
123 std::cout <<
"R1dotR2G12_11_11: destructed " << this->
label() << std::endl;
128 const SafePtr< R1dotR2G12_11_11<BFS> >
131 typedef typename SingletonManagerType::value_type map_value_type;
133 const map_value_type& val = singl_manager_.
find(key);
137 const typename SingletonManagerType::value_type& val = singl_manager_.
find(this_int);
138 val.second->instid_ = val.first;
145 const SafePtr< R1dotR2G12_11_11<BFS> >
150 BFSRef bra0_ref(bra0);
151 BFSRef bra1_ref(bra1);
152 BFSRef ket0_ref(ket0);
153 BFSRef ket1_ref(ket1);
155 typedef SafePtr<BFS> BFSRef;
156 BFSRef bra0_ref(
new BFS(bra0));
157 BFSRef bra1_ref(
new BFS(bra1));
158 BFSRef ket0_ref(
new BFS(ket0));
159 BFSRef ket1_ref(
new BFS(ket1));
161 vector<BFSRef> vbra0; vbra0.push_back(bra0_ref);
162 vector<BFSRef> vbra1; vbra1.push_back(bra1_ref);
163 vector<BFSRef> vket0; vket0.push_back(ket0_ref);
164 vector<BFSRef> vket1; vket1.push_back(ket1_ref);
165 vector< vector<BFSRef> > vvbra; vvbra.push_back(vbra0); vvbra.push_back(vbra1);
166 vector< vector<BFSRef> > vvket; vvket.push_back(vket0); vvket.push_back(vket1);
170 return Instance(bra,ket,aux);
177 return parent_type::PtrComp::equiv(static_cast<const parent_type*>(
this),a);
180 #if OVERLOAD_GENINTEGRALSET_LABEL 185 if (label_.empty()) {
187 os <<
"(" << parent_type::bra_.member(0,0)->label() <<
" " 188 << parent_type::ket_.member(0,0)->label()
189 <<
" | r_1.r_2 * G12 | " 190 << parent_type::bra_.member(1,0)->label() <<
" " 191 << parent_type::ket_.member(1,0)->label() <<
")";
GenIntegralSet< OperType, IncableBFSet, BraType, KetType, AuxIndexType > parent_type
This is the immediate parent.
Definition: r1dotr2g12_11_11.h:56
SingletonStack<T,KeyType> helps to implement Singleton-like objects of type T.
Definition: singl_stack.h:42
bool operator==(const this_type &) const
Comparison operator.
Definition: r1dotr2g12_11_11.h:175
unsigned int num_members(unsigned int p) const
Returns the number of BFS for particle p.
Definition: braket.h:247
Defaults definitions for various parameters assumed by Libint.
Definition: algebra.cc:23
GenIntegralSet is a set of integrals over functions derived from BFS.
Definition: integral.h:89
SingletonStack< R1dotR2G12_11_11, key_type > SingletonManagerType
This the type of the object that manages GenIntegralSet's as Singletons.
Definition: r1dotr2g12_11_11.h:62
Definition: stdarray.h:18
Generic integral over a two-body operator with one bfs for each particle in bra and ket...
Definition: integral_11_11.h:32
QuantumNumbersA<T,N> is a set of N quantum numbers of type T implemented in terms of a C-style array...
Definition: quanta.h:198
const value_type & find(const SafePtr< T > &obj)
Returns the pointer to the unique instance of object obj.
Definition: singl_stack.h:79
PtrEquiv<T> provides a set of comparison functions named 'equiv' which take as arguments a mix of ref...
Definition: equiv.h:35
const SafePtr< EmptySet > aux() const
Obtain the auxiliary quanta.
Definition: integral_decl.h:41
PtrEquiv< this_type > PtrComp
This class provides comparison operations on pointers.
Definition: r1dotr2g12_11_11.h:58
GenIntegralSet_11_11< CGShell, R1dotR2_G12, EmptySet > R1dotR2G12_11_11_sq
the following typedefs are useful
Definition: r1dotr2g12_11_11.h:38
R1dotR2G12_11_11< typename BFS::iter_type > iter_type
R1dotR2G12_11_11 is a set of these subobjects.
Definition: r1dotr2g12_11_11.h:54
const KetType & ket() const
Obtain const ref to bra.
DGVertex::KeyReturnType key() const
Implements Hashable::key()
Definition: integral.h:171
R1dotR1G12_11_11< CGShell > R1dotR1G12_11_11_sq
the following typedefs are useful
Definition: r1dotr1g12_11_11.h:198
const BraType & bra() const
Obtain const ref to bra.
ArrayBraket is a lightweight implementation of Braket concept.
Definition: braket.h:214
static key_type compute_key(const R1dotR2_G12 &O, const BraType &bra, const KetType &ket, const EmptySet &aux)
computes a key. it's protected so that derived classes can use it to implement smart caching in const...
Definition: integral.h:183
const std::string & label() const
Specialization of GenIntegralSet::label()
Definition: r1dotr2g12_11_11.h:183