28#ifndef _chemistry_qc_basis_obint_h
29#define _chemistry_qc_basis_obint_h
35#include <util/ref/ref.h>
36#include <util/state/state.h>
37#include <math/scmat/matrix.h>
38#include <math/scmat/elemop.h>
40#include <chemistry/qc/basis/gaussbas.h>
41#include <chemistry/qc/basis/dercent.h>
49class EfieldDotVectorData:
public RefCount
52 EfieldDotVectorData() {};
53 ~EfieldDotVectorData();
58 void set_position(
double*);
59 void set_vector(
double*);
63class DipoleData:
public RefCount
68 DipoleData(
double *d) {origin[0]=d[0]; origin[1]=d[1]; origin[2]=d[2];}
69 DipoleData() {origin[0]=origin[1]=origin[2]=0.0;}
71 void set_origin(
double*);
75class PointChargeData:
public RefCount
79 const double *charges_;
80 const double *
const*positions_;
81 double *alloced_charges_;
82 double **alloced_positions_;
87 PointChargeData(
int ncharge,
88 const double *
const*positions,
const double *charges,
92 int ncharges()
const {
return ncharges_; }
93 const double *charges()
const {
return charges_; }
94 const double *
const*positions()
const {
return positions_; }
100class OneBodyInt :
public RefCount {
115 virtual ~OneBodyInt();
160 Integral *integral()
const {
return integral_; }
167class OneBodyOneCenterInt :
public RefCount {
176 OneBodyOneCenterInt(
Integral *integral,
180 virtual ~OneBodyOneCenterInt();
219 Integral *integral()
const {
return integral_; }
224class OneBodyOneCenterWrapper :
public OneBodyOneCenterInt {
257 void init(
const double * buffer,
int ishell,
int jshell,
258 int ioff,
int joff,
int nfunci,
int nfuncj,
int redund=0,
261 void start() { icur=jcur=index=0; }
262 int ready()
const {
return (icur < iend); }
265 if (jcur < ((e12)?(icur):((jend)-1))) {
277 int current_i()
const {
return icur; }
278 int current_j()
const {
return jcur; }
280 int i()
const {
return icur+ioffset; }
281 int j()
const {
return jcur+joffset; }
283 int nint()
const {
return iend*jend; }
285 double val()
const {
return buf[index]*scale_; }
290class OneBodyIntIter :
public RefCount {
311 virtual ~OneBodyIntIter();
313 virtual void start(
int ist=0,
int jst=0,
int ien=0,
int jen=0);
316 int ready()
const {
return (icur < iend); }
318 int ishell()
const {
return icur; }
319 int jshell()
const {
return jcur; }
321 int ijshell()
const {
return ij; }
323 int redundant()
const {
return redund; }
324 void set_redundant(
int i) { redund=i; }
326 virtual double scale()
const;
332 virtual bool cloneable();
340class OneBodyIntOp:
public SCElementOp {
347 virtual ~OneBodyIntOp();
361class OneBody3IntOp:
public SCElementOp3 {
368 virtual ~OneBody3IntOp();
380 int has_side_effects();
381 int has_side_effects_in_arg1();
382 int has_side_effects_in_arg2();
390class OneBodyDerivInt :
public RefCount {
405 virtual ~OneBodyDerivInt();
444class OneBodyOneCenterDerivInt :
public RefCount {
455 virtual ~OneBodyOneCenterDerivInt();
DerivCenters keeps track the centers that derivatives are taken with respect to.
Definition dercent.h:41
The Integral abstract class acts as a factory to provide objects that compute one and two electron in...
Definition integral.h:58
int nshell2() const
Return the number of shells on center two.
Ref< GaussianBasisSet > basis2()
Return the basis set on center two.
Ref< GaussianBasisSet > basis1()
Return the basis set on center one.
int nshell1() const
Return the number of shells on center one.
Ref< GaussianBasisSet > basis()
Return the basis set on center one.
virtual void compute_shell(int ish, int jsh, int center)=0
Compute the derivative integrals with respect to the given center and place the result in the buffer ...
int nbasis1() const
Return the number of basis functions on the center one.
int nbasis2() const
Return the number of basis functions on the center two.
int nshell() const
Return the number of shells on center one.
virtual void compute_shell(int ish, int jsh, DerivCenters &)=0
Compute the derivative integrals and place the result in the buffer returned by buffer().
const double * buffer() const
The computed shell integrals will be put in the buffer returned by this member.
int nbasis() const
Return the number of basis functions on center one.
int has_side_effects()
By default this returns nonzero.
Ref< SCElementOp > clone()
Returns a clone of this object.
bool cloneable()
Returns true if this SCElementOp supports the cloneable member.
void process(SCMatrixBlockIter &)
This is the fallback routine to process blocks and is called by process_spec members that are not ove...
void process_spec_rect(SCMatrixRectBlock *)
Matrices should call these members when the type of block is known.
virtual bool cloneable()
Return true if the clone member can be called.
int nshell2() const
Return the number of shells on the center two.
virtual Ref< OneBodyInt > clone()
Returns a clone of this.
virtual void compute_shell(int, int)=0
Computes the integrals between basis functions in the given shell pair.
int nbasis1() const
Returns the number of basis functions on the center one.
Ref< GaussianBasisSet > basis1()
Return the basis set on the center one.
int nbasis() const
Returns the number of basis functions on center one.
const double * buffer() const
Returns the buffer where the integrals are placed.
virtual void reinitialize()
This is called for one body integrals that take data to let them know that the data they reference ha...
Ref< GaussianBasisSet > basis()
Return the basis set on center one.
int nbasis2() const
Returns the number of basis functions on the center two.
Ref< GaussianBasisSet > basis2()
Return the basis set on the center two.
int nshell1() const
Return the number of shells on the center one.
int nshell() const
Return the number of shells on center one.
int nshell1() const
Return the number of shells on center one.
const double * buffer() const
The computed shell integrals will be put in the buffer returned by this member.
virtual void compute_shell(int ish, int center)=0
Compute the derivative integrals with respect to the given center and place the result in the buffer ...
int nbasis1() const
Return the number of basis functions on center one.
int nbasis() const
Return the number of basis functions on center one.
int nshell() const
Return the number of shells on center one.
Ref< GaussianBasisSet > basis1()
Return the basis set on center one.
Ref< GaussianBasisSet > basis()
Return the basis set on center one.
virtual void compute_shell(int ish, DerivCenters &)=0
Compute the derivative integrals and place the result in the buffer returned by buffer().
int nshell1() const
Return the number of shells on the center one.
const double * buffer() const
Returns the buffer where the integrals are placed.
virtual bool cloneable()
Return true if the clone member can be called.
virtual void reinitialize()
This is called for one body integrals that take data to let them know that the data they reference ha...
Ref< GaussianBasisSet > basis()
Return the basis set on center one.
int nbasis1() const
Returns the number of basis functions on the center one.
Ref< GaussianBasisSet > basis1()
Return the basis set on the center one.
virtual Ref< OneBodyOneCenterInt > clone()
Returns a clone of this.
virtual void compute_shell(int)=0
Computes the integrals for basis functions on the given shell.
int nbasis() const
Returns the number of basis functions on center one.
int nshell() const
Return the number of shells on center one.
void compute_shell(int)
Computes the integrals for basis functions on the given shell.
A template class that maintains references counts.
Definition ref.h:332
The SCMatrixBlockIter class is used to described iterates that loop through the elements in a block.
Definition blkiter.h:50
The SCMatrixLTriBlock describes a triangular piece of a matrix.
Definition block.h:257
The SCMatrixLTriSubBlock describes a triangular subblock of a matrix.
Definition block.h:292
The SCMatrixRectBlock describes a rectangular piece of a matrix.
Definition block.h:187
The SCMatrixRectSubBlock describes a rectangular piece of a matrix.
Definition block.h:223