28#ifndef _chemistry_qc_basis_tbint_h
29#define _chemistry_qc_basis_tbint_h
31#include <util/ref/ref.h>
32#include <util/group/message.h>
33#include <util/container/stdarray.h>
34#include <chemistry/qc/basis/gaussbas.h>
35#include <chemistry/qc/basis/dercent.h>
36#include <chemistry/qc/basis/operator.h>
37#include <chemistry/qc/basis/obint.h>
48struct TwoBodyIntShape {
64 double *log2_to_double_;
70 std::vector< Ref<GaussianBasisSet> > bs_;
87 virtual NBodyOperSet::type
type()
const =0;
95 virtual const double *
buffer(NBodyOper::type
type = NBodyOper::coulomb)
const;
108 std::pair<std::map<TwoBodyOper::type,const double*>,std::array<unsigned long,4> >
144class ShellQuartetIter {
179 virtual ~ShellQuartetIter();
181 virtual void init(
const double *,
187 virtual void start();
190 int ready()
const {
return icur < iend; }
192 int i()
const {
return i_; }
193 int j()
const {
return j_; }
194 int k()
const {
return k_; }
195 int l()
const {
return l_; }
197 int nint()
const {
return iend*jend*kend*lend; }
199 double val()
const {
return buf[index]*scale_; }
220 virtual void start();
223 int ready()
const {
return (icur < iend); }
225 int ishell()
const {
return icur; }
226 int jshell()
const {
return jcur; }
227 int kshell()
const {
return kcur; }
228 int lshell()
const {
return lcur; }
230 virtual double scale()
const;
262 virtual void start(
int ist=0,
int jst=0,
int ien=0,
int jen=0);
265 int ready()
const {
return (icur < iend); }
267 int ishell()
const {
return icur; }
268 int jshell()
const {
return jcur; }
270 int ijshell()
const {
return ij; }
272 int redundant()
const {
return redund; }
273 void set_redundant(
int i) { redund=i; }
275 virtual double scale()
const;
277 Ref<TwoBodyTwoCenterInt> two_body_int() {
return tbi; }
279 ShellPairIter& current_pair();
281 virtual bool cloneable()
const;
282 virtual Ref<TwoBodyTwoCenterIntIter> clone();
288class TwoBodyTwoCenterIntOp:
public SCElementOp {
290 Ref<TwoBodyTwoCenterIntIter> iter;
293 TwoBodyTwoCenterIntOp(
const Ref<TwoBodyTwoCenterInt>&);
294 TwoBodyTwoCenterIntOp(
const Ref<TwoBodyTwoCenterIntIter>&);
295 virtual ~TwoBodyTwoCenterIntOp();
The Integral abstract class acts as a factory to provide objects that compute one and two electron in...
Definition integral.h:111
This is an abstract base type for classes that compute integrals of general N-body operators describe...
Definition nbint.h:61
virtual Ref< TwoBodyInt > clone()
Returns a clone of this.
virtual const Ref< OperSetDescr > & descr() const =0
return the operator set descriptor
virtual int log2_shell_bound(int=-1, int=-1, int=-1, int=-1)=0
Return log base 2 of the maximum magnitude of any integral in a shell block obtained from compute_she...
virtual NBodyOperSet::type type() const =0
Returns the type of the operator set that this object computes.
virtual void set_integral_storage(size_t storage)
This storage is used to cache computed integrals.
std::pair< std::map< TwoBodyOper::type, const double * >, std::array< unsigned long, 4 > > compute_shell_arrays(int, int, int, int)
Given four shell indices, supported two body integral types are computed and returned.
virtual const double * buffer(NBodyOper::type type=NBodyOper::coulomb) const
The computed shell integrals will be put in the buffer returned by this member.
virtual void set_redundant(int i)
See redundant().
Definition nbint.h:125
virtual void compute_shell(int, int, int, int)=0
Given four shell indices, integrals will be computed and placed in the buffer.
Ref< GaussianBasisSet > basis(size_t center=0)
Return the number of basis functions on center center.
Definition nbint.h:82
virtual int redundant() const
If redundant is true, then keep redundant integrals in the buffer.
Definition nbint.h:123
double shell_bound(int=-1, int=-1, int=-1, int=-1)
Return the maximum magnitude of any integral in a shell block obtained from compute_shell.
Integral * integral() const
Return the integral factory that was used to create this object.
Definition nbint.h:139
virtual bool cloneable() const
Return true if the clone member can be called.
The base class for all reference counted objects.
Definition ref.h:192
A template class that maintains references counts.
Definition ref.h:361
The SCMatrixBlockIter class is used to described iterates that loop through the elements in a block.
Definition blkiter.h:46
The SCMatrixLTriBlock describes a triangular piece of a matrix.
Definition block.h:253
The SCMatrixLTriSubBlock describes a triangular subblock of a matrix.
Definition block.h:288
The SCMatrixRectBlock describes a rectangular piece of a matrix.
Definition block.h:183
The SCMatrixRectSubBlock describes a rectangular piece of a matrix.
Definition block.h:219
void process_spec_rect(SCMatrixRectBlock *)
Matrices should call these members when the type of block is known.
void process(SCMatrixBlockIter &)
This is the fallback routine to process blocks and is called by process_spec members that are not ove...
Ref< SCElementOp > clone()
Returns a clone of this object.
bool cloneable() const
Returns true if this SCElementOp supports the clone() member.
int has_side_effects()
By default this returns nonzero.
Contains all MPQC code up to version 3.
Definition mpqcin.h:14
value
Definition nbint.h:49
@ _O_22
4-center integral in chemistry convention
Definition nbint.h:51
@ _O_2
3-center integral
Definition nbint.h:53
type
types of known two-body operators
Definition operator.h:318
@ eri
two-body Coulomb
Definition operator.h:319