21#ifndef _libint2_src_bin_libint_r1dotr1g121111_h_
22#define _libint2_src_bin_libint_r1dotr1g121111_h_
34 public GenIntegralSet< R1dotR1_G12, IncableBFSet, typename DefaultTwoPBraket<BFS>::Result, typename DefaultTwoPBraket<BFS>::Result, EmptySet >
37 typedef BFS BasisFunctionType;
38 typedef R1dotR1_G12 OperType;
51 typedef typename parent_type::key_type key_type;
58 static const std::shared_ptr<R1dotR1G12_11_11> Instance(
const BFS& bra0,
const BFS& ket0,
const BFS& bra1,
const BFS& ket1);
65#if OVERLOAD_GENINTEGRALSET_LABEL
67 const std::string&
label()
const;
78 bool this_precomputed()
const;
79#if OVERLOAD_GENINTEGRALSET_LABEL
80 mutable std::string label_;
85#if USE_INT_KEY_TO_HASH
90#error "USE_INT_KEY_TO_HASH must be set"
95 parent_type(R1dotR1_G12(),bra, ket, aux)
98 throw std::runtime_error(
"R1dotR1G12_11_11<BFS>::R1dotR1G12_11_11(bra,ket) -- number of BFSs in bra for particle 0 must be 1");
100 throw std::runtime_error(
"R1dotR1G12_11_11<BFS>::R1dotR1G12_11_11(bra,ket) -- number of BFSs in bra for particle 1 must be 1");
102 throw std::runtime_error(
"R1dotR1G12_11_11<BFS>::R1dotR1G12_11_11(bra,ket) -- number of BFSs in ket for particle 0 must be 1");
104 throw std::runtime_error(
"R1dotR1G12_11_11<BFS>::R1dotR1G12_11_11(bra,ket) -- number of BFSs in ket for particle 1 must be 1");
106 std::cout <<
"R1dotR1G12_11_11: constructed " << this->
label() << std::endl;
111 R1dotR1G12_11_11<BFS>::~R1dotR1G12_11_11()
114 std::cout <<
"R1dotR1G12_11_11: destructed " << this->label() << std::endl;
119 const std::shared_ptr< R1dotR1G12_11_11<BFS> >
122 typedef typename SingletonManagerType::value_type map_value_type;
123 key_type key = compute_key(OperType(),bra,ket,aux);
124 const map_value_type& val = singl_manager_.find(key);
128const typename SingletonManagerType::value_type& val = singl_manager_.find(this_int);
129val.second->instid_ = val.first;
136 const std::shared_ptr< R1dotR1G12_11_11<BFS> >
141 BFSRef bra0_ref(bra0);
142 BFSRef bra1_ref(bra1);
143 BFSRef ket0_ref(ket0);
144 BFSRef ket1_ref(ket1);
146 typedef std::shared_ptr<BFS> BFSRef;
147 BFSRef bra0_ref(
new BFS(bra0));
148 BFSRef bra1_ref(
new BFS(bra1));
149 BFSRef ket0_ref(
new BFS(ket0));
150 BFSRef ket1_ref(
new BFS(ket1));
152 std::vector<BFSRef> vbra0; vbra0.push_back(bra0_ref);
153 std::vector<BFSRef> vbra1; vbra1.push_back(bra1_ref);
154 std::vector<BFSRef> vket0; vket0.push_back(ket0_ref);
155 std::vector<BFSRef> vket1; vket1.push_back(ket1_ref);
156 std::vector< std::vector<BFSRef> > vvbra; vvbra.push_back(vbra0); vvbra.push_back(vbra1);
157 std::vector< std::vector<BFSRef> > vvket; vvket.push_back(vket0); vvket.push_back(vket1);
160 AuxIndexType aux(std::vector<int>(0));
161 return Instance(bra,ket,aux);
168 return parent_type::PtrComp::equiv(
static_cast<const parent_type*
>(
this),a);
171#if OVERLOAD_GENINTEGRALSET_LABEL
176 if (label_.empty()) {
178os <<
"(" << parent_type::bra_.member(0,0)->label() <<
" "
179 << parent_type::ket_.member(0,0)->label()
180 <<
" | r_1^2 * G12 | "
181 << parent_type::bra_.member(1,0)->label() <<
" "
182 << parent_type::ket_.member(1,0)->label() <<
")";
ArrayBraket is a lightweight implementation of Braket concept.
Definition src/bin/libint/braket.h:39
unsigned int num_members(unsigned int p) const
Returns the number of BFS for particle p.
Definition src/bin/libint/braket.h:79
GenIntegralSet is a set of integrals over functions derived from BFS.
Definition integral.h:99
const BraType & bra() const
Obtain const ref to bra.
Definition integral.h:406
const KetType & ket() const
Obtain const ref to bra.
Definition integral.h:414
const std::shared_ptr< EmptySet > aux() const
Obtain the auxiliary quanta.
Definition integral.h:428
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:193
R1dotR1G12_11_11 – integral over R1dotR1_G12 operator with one bfs for each particle in bra and ket.
Definition r1dotr1g12_11_11.h:35
R1dotR1G12_11_11< typename BFS::iter_type > iter_type
R1dotR1G12_11_11 is a set of these subobjects.
Definition r1dotr1g12_11_11.h:45
PtrEquiv< this_type > PtrComp
This class provides comparison operations on pointers.
Definition r1dotr1g12_11_11.h:49
const std::string & label() const
Specialization of GenIntegralSet::label()
Definition r1dotr1g12_11_11.h:174
bool operator==(const this_type &) const
Comparison operator.
Definition r1dotr1g12_11_11.h:166
GenIntegralSet< OperType, IncableBFSet, BraType, KetType, AuxIndexType > parent_type
This is the immediate parent.
Definition r1dotr1g12_11_11.h:47
SingletonStack< R1dotR1G12_11_11, key_type > SingletonManagerType
This the type of the object that manages GenIntegralSet's as Singletons.
Definition r1dotr1g12_11_11.h:53
SingletonStack<T,KeyType> helps to implement Singleton-like objects of type T.
Definition singl_stack.h:45
Defaults definitions for various parameters assumed by Libint.
Definition algebra.cc:24
R1dotR1G12_11_11< CGShell > R1dotR1G12_11_11_sq
the following typedefs are useful
Definition r1dotr1g12_11_11.h:197