28 #ifndef _mpqc_src_lib_chemistry_qc_basis_tbint_batch_h
29 #define _mpqc_src_lib_chemistry_qc_basis_tbint_batch_h
31 #include <util/ref/ref.h>
32 #include <chemistry/qc/basis/gaussbas.h>
37 template <
int NumCenters,
typename T>
40 T operator[](
size_t i)
const {
43 T& operator[](
size_t i) {
47 for(
int i = 0; i < NumCenters; i++)
60 virtual void init() =0;
64 virtual void next() =0;
77 start_(start), fence_(fence), in_range_(false) {
95 in_range_ = have_next_;
97 have_next_ = inc(next_);
106 bool inc(IntTuple & s) {
107 unsigned int d = NDIM - 1;
109 while (s[d] >= fence_[d]) {
119 for (
unsigned int d = 0; d < NDIM; ++d)
120 if (fence_[d] <= start_[d])
136 template <
unsigned int NumCenters>
149 bs_[0] = i->basis1();
151 bs_[1] = i->basis2();
153 bs_[2] = i->basis3();
155 bs_[3] - i->basis4();
168 virtual bool next() = 0;
171 virtual const std::vector<IntTuple>&
current_batch()
const = 0;
219 std::vector<double> buffer_;
220 std::vector<IntTuple> shells_in_buffer_;
221 std::vector<IntTuple> start_;
222 std::vector<IntTuple> fence_;
226 template <
int NumCenters>
struct TwoBodyIntEvalType;
229 template <
int NumCenters>
239 this->buffer_.clear();
246 in_buf_ = tbint_->
buffer();
259 return tbint_->
type();
262 return tbint_->
descr();
266 this->buf_cap_ = storage;
267 this->buffer_.reserve(storage);
268 this->shells_in_buffer_.reserve(storage);
272 return this->shells_in_buffer_ ;
276 const std::vector<IntTuple>& start(){
277 return this->start_ ;
280 const std::vector<IntTuple>& fence(){
281 return this->fence_ ;
294 for (
int sp = 0; sp < s, sr_.have_next(); sp++) {
309 const double *in_buf_;
319 #endif // end of header guard
virtual const double * buffer(TwoBodyOper::type type=TwoBodyOper::eri) const =0
The computed shell integrals will be put in the buffer returned by this member.
virtual const std::vector< IntTuple > & current_batch() const =0
returns the shell indices of the current batch
void init(const Ref< IndexRangeIterator< NumCenters > > &n, Seed s=Seed())
prepare to iterate using seed s TODO JTF implement
virtual Ref< TwoBodyIntEval > clone()
Returns a clone of this.
const Ref< GaussianBasisSet > & basis(unsigned int c=0) const
Return the basis set on center c TODO JTF implement.
bool in_range() const
returns false if there are no more
Definition: tbint_batch.h:90
TensorIndexRangeIterator is a direct product of shell ranges for each center.
Definition: tbint_batch.h:71
const IntTuple & current() const
current shell set
Definition: tbint_batch.h:100
const std::vector< IntTuple > & current_batch() const
returns the shell indices of the current batch
Definition: tbint_batch.h:271
TwoBodyOperSet::type type() const
Returns the type of the operator set that this object computes.
Definition: tbint_batch.h:258
type
Definition: operator.h:344
const double * buffer(TwoBodyOper::type type=TwoBodyOper::eri) const
The computed shell integrals will be put in the buffer returned by this member.
Definition: tbint_batch.h:284
A template class that maintains references counts.
Definition: ref.h:361
Integral * integral() const
Return the integral factory that was used to create this object.
Definition: tbint.h:917
virtual const IntTuple & current() const =0
current shell set
bool cloneable() const
Return true if the clone member can be called.
Definition: tbint_batch.h:250
virtual TwoBodyOperSet::type type() const =0
Returns the type of the operator set that this object computes.
virtual bool in_range() const =0
returns false if there are no more
virtual TwoBodyOperSet::type type() const =0
Returns the type of the operator set that this object computes.
TensorIndexRangeIterator(const IntTuple &start, const IntTuple &fence)
Constructs a [start, fence) IndexRangeIterator.
Definition: tbint_batch.h:76
virtual void init()=0
initialize the iterator
returns the type of the evaluator for evaluating this set of two-body integrals
Definition: integral.h:83
void set_integral_storage(size_t storage)
This storage is used to cache computed integrals.
Definition: tbint_batch.h:265
virtual bool cloneable() const =0
Return true if the clone member can be called.
Integral * integral() const
Return the integral factory that was used to create this object.
Definition: tbint_batch.h:207
bool next()
compute next batch, return true if have another may need to be split into have_next and next TODO JTF...
Definition: tbint_batch.h:300
The Integral abstract class acts as a factory to provide objects that compute one and two electron in...
Definition: integral.h:111
void next()
update current
Definition: tbint_batch.h:94
Ref< TwoBodyIntBatch< NumCenters > > clone()
Returns a clone of this.
Definition: tbint_batch.h:254
virtual Ref< TwoBodyIntBatch > clone()=0
Returns a clone of this.
two-body Coulomb
Definition: operator.h:319
Definition: tbint_batch.h:38
virtual const Ref< TwoBodyOperSetDescr > & descr() const =0
return the operator set descriptor
void init()
initialize the iterator
Definition: tbint_batch.h:80
This is an abstract base type for classes that compute integrals involving two electrons and 2 functi...
Definition: tbint_batch.h:137
virtual const Ref< TwoBodyOperSetDescr > & descr() const =0
return the operator set descriptor
type
types of known two-body operators
Definition: operator.h:318
virtual bool next()=0
compute next batch, return true if have another may need to be split into have_next and next TODO JTF...
The base class for all reference counted objects.
Definition: ref.h:192
This is an abstract range of indices.
Definition: tbint_batch.h:55
This is a generic implementation of TwoBodyIntBatch in terms of a TwoBodyInt.
Definition: tbint_batch.h:230
virtual void set_integral_storage(size_t storage)=0
This storage is used to cache computed integrals.
Contains all MPQC code up to version 3.
Definition: mpqcin.h:14
virtual const double * buffer(TwoBodyOper::type type=TwoBodyOper::eri) const
The computed shell integrals will be put in the buffer returned by this member.
const Ref< TwoBodyOperSetDescr > & descr() const
return the operator set descriptor
Definition: tbint_batch.h:261
virtual void next()=0
update current
Generated at Sun Jan 26 2020 23:23:57 for MPQC
3.0.0-alpha using the documentation package Doxygen
1.8.16.