28#ifndef _chemistry_qc_basis_integral_h
29#define _chemistry_qc_basis_integral_h
33#include <util/state/state.h>
34#include <util/group/message.h>
35#include <chemistry/qc/basis/basis.h>
36#include <chemistry/qc/basis/obint.h>
37#include <chemistry/qc/basis/tbint.h>
38#include <chemistry/qc/basis/intparams.h>
39#include <chemistry/qc/basis/operator.h>
41#define INTEGRALTHROWDEFAULT { throw ProgrammingError("not implemented in this particular factory", __FILE__, __LINE__); }
45class SymmetryOperation;
49class RedundantCartesianIter;
50class RedundantCartesianSubIter;
51class SphericalTransformIter;
52class SphericalTransform;
125 MPQCSolidHarmonicsOrdering,
126 CCASolidHarmonicsOrdering
127 } SolidHarmonicsOrdering;
128 SolidHarmonicsOrdering sharmorder_;
133 size_t storage_used_;
144 static const SolidHarmonicsOrdering default_sharmorder_ = CCASolidHarmonicsOrdering;
176 IntV3CartesianOrdering,
177 CCACartesianOrdering,
178 GAMESSCartesianOrdering,
205 size_t deriv_level = 0,
301 int inv=0,
int subl=-1) =0;
308 int inv=0,
int subl=-1) =0;
456 size_t deriv_level = 0,
473 template <
int NumCenters>
491 template <
int NumCenters>
500 template <
int NumCenters>
503 return EvalCreator::eval(
this,p);
510 template <
int NumCenters>
513 return EvalCreator::eval(
this,p);
519 template <
int NumCenters>
522 return EvalCreator::eval(
this,p);
541 template <
int NumCenters>
545 return EvalCreator::eval(
this,p);
549 return EvalCreator::eval(
this,p);
551 std::ostringstream oss;
552 oss <<
"Integral::r12_k_g12 can only be computed for k=-1 and 0 but k = " << k;
572 template <
int NumCenters>
575 return EvalCreator::eval(
this,p);
591 template <
int NumCenters>
665 virtual
Ref<
TwoBodyInt> delta_function_4() INTEGRALTHROWDEFAULT;
696 return factory->grt_4();
702 return factory->grt_3();
708 return factory->grt_2();
715 return factory->g12_4(params);
721 return factory->g12_3(params);
727 return factory->g12_2(params);
734 return factory->g12nc_4(params);
740 return factory->g12nc_3(params);
746 return factory->g12nc_2(params);
753 return factory->g12dkh_4(params);
759 return factory->g12dkh_3(params);
765 return factory->g12dkh_2(params);
772 return factory->r120g12_4(params);
778 return factory->r120g12_3(params);
784 return factory->r120g12_2(params);
791 return factory->r12m1g12_4(params);
797 return factory->r12m1g12_3(params);
803 return factory->r12m1g12_2(params);
810 return factory->g12t1g12_4(params);
816 return factory->g12t1g12_3(params);
822 return factory->g12t1g12_2(params);
829 return factory->delta_function_4();
835 return factory->delta_function_3();
841 return factory->delta_function_2();
CartesianIter gives the ordering of the Cartesian functions within a shell for the particular integra...
Definition cartiter.h:35
This is thrown when an attempt is made to use a feature that is not yet implemented.
Definition scexception.h:120
Used to pass params to Integral::g12().
Definition intparams.h:144
Passes params to Integral::electron_repulsion() and other factory methods which do not need parameter...
Definition intparams.h:107
The Integral abstract class acts as a factory to provide objects that compute one and two electron in...
Definition integral.h:111
size_t storage_used() const
Returns how much storage has been used.
Definition integral.h:186
virtual int equiv(const Ref< Integral > &)
Returns nonzero if this and the given Integral object have the same integral ordering,...
virtual Ref< OneBodyInt > point_charge(const Ref< PointChargeData > &)=0
Return a OneBodyInt that computes the integrals for interactions with point charges.
virtual Ref< OneBodyDerivInt > kinetic_deriv()=0
Return a OneBodyDerivInt that computes kinetic energy derivatives.
Ref< typename TwoBodyIntEvalType< NumCenters >::value > g12dkh(const Ref< IntParamsG12 > &p)
Return a TwoBodyInt that computes two-electron integrals specific to relativistic explicitly correlat...
Definition integral.h:520
virtual size_t storage_required_grt(const Ref< GaussianBasisSet > &b1, const Ref< GaussianBasisSet > &b2=0, const Ref< GaussianBasisSet > &b3=0, const Ref< GaussianBasisSet > &b4=0)
Returns how much storage will be needed to initialize a two-body integrals evaluator for linear R12 i...
virtual size_t storage_required_g12dkh(const Ref< GaussianBasisSet > &b1, const Ref< GaussianBasisSet > &b2=0, const Ref< GaussianBasisSet > &b3=0, const Ref< GaussianBasisSet > &b4=0)
Returns how much storage will be needed to initialize a two-body integrals evaluator for G12DKH integ...
virtual DEPRECATED Ref< TwoBodyInt > electron_repulsion()
Return a TwoBodyInt that computes electron repulsion integrals.
virtual size_t storage_required_eri(const Ref< GaussianBasisSet > &b1, const Ref< GaussianBasisSet > &b2=0, const Ref< GaussianBasisSet > &b3=0, const Ref< GaussianBasisSet > &b4=0)
Returns how much storage will be needed to initialize a two-body integrals evaluator for electron rep...
virtual Ref< OneBodyInt > p_cross_nuclear_p()
Return a OneBodyInt that computes , where is the nuclear potential.
Integral(const Ref< GaussianBasisSet > &b1, const Ref< GaussianBasisSet > &b2, const Ref< GaussianBasisSet > &b3, const Ref< GaussianBasisSet > &b4)
Initialize the Integral object given a GaussianBasisSet for each center.
virtual Ref< OneBodyInt > dipole(const Ref< IntParamsOrigin > &O=0)=0
Return a OneBodyInt that computes electric dipole moment integrals, i.e.
virtual Ref< TwoBodyTwoCenterDerivInt > electron_repulsion2_deriv()
Return a TwoBodyTwoCenterInt that computes electron repulsion integrals.
virtual Ref< OneBodyDerivInt > overlap_deriv()=0
Return a OneBodyDerivInt that computes overlap derivatives.
static Integral * get_default_integral()
Returns the default Integral factory.
virtual DEPRECATED Ref< TwoBodyThreeCenterInt > electron_repulsion3()
Return a TwoBodyThreeCenterInt that computes electron repulsion integrals.
const Ref< GaussianBasisSet > & basis1() const
retrieves basis for center 1
Definition integral.h:261
virtual void set_basis(const Ref< GaussianBasisSet > &b1, const Ref< GaussianBasisSet > &b2=0, const Ref< GaussianBasisSet > &b3=0, const Ref< GaussianBasisSet > &b4=0)
Set the basis set for each center.
virtual const SphericalTransform * spherical_transform(int l, int inv=0, int subl=-1)=0
Return a SphericalTransform object.
virtual Ref< TwoBodyDerivInt > electron_repulsion_deriv()
Return a TwoBodyDerivInt that computes electron repulsion derivatives.
Ref< typename TwoBodyIntEvalType< NumCenters >::value > r12_k_g12(const Ref< IntParamsG12 > &p, int k)
Return the evaluator of two-body integrals with kernel where is a geminal described by the IntPar...
Definition integral.h:542
void adjust_storage(ptrdiff_t s)
The specific integral classes use this to tell Integral how much memory they are using/freeing.
virtual void set_storage(size_t i)
Sets the total amount of storage, in bytes, that is available.
virtual RedundantCartesianIter * new_redundant_cartesian_iter(int)=0
Return a RedundantCartesianIter object.
Integral(StateIn &)
Restore the Integral object from the given StateIn object.
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
CartesianOrdering
Describes the ordering of the cartesian functions in a shell.
Definition integral.h:175
virtual Ref< OneBodyInt > quadrupole(const Ref< IntParamsOrigin > &O=0)=0
Return a OneBodyInt that computes electric quadrupole moment integrals, i.e.
DEPRECATED Ref< typename TwoBodyIntEvalType< NumCenters >::value > g12(const Ref< IntParamsG12 > &p)
Return a TwoBodyInt that computes two-electron integrals specific to explicitly correlated methods wh...
Definition integral.h:501
virtual size_t storage_required_g12nc(const Ref< GaussianBasisSet > &b1, const Ref< GaussianBasisSet > &b2=0, const Ref< GaussianBasisSet > &b3=0, const Ref< GaussianBasisSet > &b4=0)
Returns how much storage will be needed to initialize a two-body integrals evaluator for G12NC integr...
Ref< typename TwoBodyIntEvalType< NumCenters >::value > g12t1g12(const Ref< IntParamsG12 > &p)
Return the evaluator of two-body integrals with kernel where is a geminal described by the IntPar...
Definition integral.h:573
virtual Ref< OneBodyInt > efield_gradient(const Ref< IntParamsOrigin > &O)
Return a OneBodyInt that computes the electric field gradient integrals at specified point.
virtual SphericalTransformIter * new_spherical_transform_iter(int l, int inv=0, int subl=-1)=0
Return a SphericalTransformIter object.
virtual Ref< TwoBodyIntEval > make_eval(TwoBodyOper::type opertype, TwoBodyIntShape::value tbinttype, size_t deriv_level=0, const Ref< GaussianBasisSet > &b1=0, const Ref< GaussianBasisSet > &b2=0, const Ref< GaussianBasisSet > &b3=0, const Ref< GaussianBasisSet > &b4=0)
Creates an evaluator for opertype.
virtual Ref< OneBodyDerivInt > nuclear_deriv()=0
Return a OneBodyDerivInt that computes nuclear repulsion derivatives.
virtual Ref< TwoBodyThreeCenterDerivInt > electron_repulsion3_deriv()
Return a TwoBodyThreeCenterInt that computes electron repulsion integrals.
ShellRotation shell_rotation(int am, SymmetryOperation &, int pure=0)
Return the ShellRotation object for a shell of the given angular momentum.
virtual Ref< OneBodyInt > p4()=0
Return a OneBodyInt that computes .
virtual Ref< OneBodyInt > efield(const Ref< IntParamsOrigin > &O)=0
Return a OneBodyInt that computes the electric field integrals at specified point.
Ref< typename TwoBodyIntEvalType< NumCenters >::value > coulomb()
Return the evaluator of two-body integrals with Coulomb kernel: The evaluator will produce a set o...
Definition integral.h:474
virtual size_t storage_required_eri_deriv(const Ref< GaussianBasisSet > &b1, const Ref< GaussianBasisSet > &b2=0, const Ref< GaussianBasisSet > &b3=0, const Ref< GaussianBasisSet > &b4=0)
Returns how much storage will be needed to initialize a two-body integrals evaluator for derivative e...
virtual Ref< OneBodyInt > p_dot_nuclear_p()
Return a OneBodyInt that computes , where is the nuclear potential.
static Integral * initial_integral(int &argc, char **argv)
Create an integral factory.
virtual Ref< OneBodyDerivInt > hcore_deriv()=0
Return a OneBodyDerivInt that computes core Hamiltonian derivatives.
const Ref< GaussianBasisSet > & basis4() const
retrieves basis for center 4
Definition integral.h:267
Ref< typename TwoBodyIntEvalType< NumCenters >::value > delta_function()
Return the evaluator of two-body integrals with kernel i.e.
Definition integral.h:592
Integral(const Ref< KeyVal > &)
Construct the Integral object from the given KeyVal object.
virtual RedundantCartesianSubIter * new_redundant_cartesian_sub_iter(int)=0
Return a RedundantCartesianSubIter object.
static void set_default_integral(const Ref< Integral > &)
Specifies a new default Integral factory.
virtual Ref< OneBodyInt > kinetic()=0
Return a OneBodyInt that computes the kinetic energy.
const Ref< GaussianBasisSet > & basis2() const
retrieves basis for center 2
Definition integral.h:263
virtual Ref< OneBodyInt > hcore()=0
Return a OneBodyInt that computes the core Hamiltonian integrals.
Ref< PetiteList > petite_list()
Return the PetiteList object.
virtual Ref< OneBodyInt > overlap()=0
Return a OneBodyInt that computes the overlap.
DEPRECATED Ref< typename TwoBodyIntEvalType< NumCenters >::value > g12nc(const Ref< IntParamsG12 > &p)
Return a TwoBodyInt that computes two-electron integrals specific to explicitly correlated methods wh...
Definition integral.h:511
virtual Ref< OneBodyInt > nuclear()=0
Return a OneBodyInt that computes the nuclear repulsion integrals.
virtual DEPRECATED Ref< TwoBodyTwoCenterInt > electron_repulsion2()
Return a TwoBodyTwoCenterInt that computes electron repulsion integrals.
Ref< MessageGrp > messagegrp()
Return the MessageGrp used by the integrals objects.
Definition integral.h:280
virtual size_t storage_required_g12(const Ref< GaussianBasisSet > &b1, const Ref< GaussianBasisSet > &b2=0, const Ref< GaussianBasisSet > &b3=0, const Ref< GaussianBasisSet > &b4=0)
Returns how much storage will be needed to initialize a two-body integrals evaluator for G12 integral...
const Ref< GaussianBasisSet > & basis3() const
retrieves basis for center 3
Definition integral.h:265
virtual Ref< OneBodyOneCenterInt > point_charge1(const Ref< PointChargeData > &)
Return a OneBodyInt that computes the integrals for interactions with point charges.
size_t storage_unused() const
Returns how much storage was not needed.
virtual size_t storage_required(TwoBodyOper::type opertype, TwoBodyIntShape::value tbinttype, size_t deriv_level=0, const Ref< GaussianBasisSet > &b1=0, const Ref< GaussianBasisSet > &b2=0, const Ref< GaussianBasisSet > &b3=0, const Ref< GaussianBasisSet > &b4=0)
Reports the approximate amount of memory required, in bytes, to create an evaluator for opertype.
virtual Ref< OneBodyInt > efield_dot_vector(const Ref< EfieldDotVectorData > &)=0
Return a OneBodyInt that computes the electric field integrals at a given position dotted with a give...
virtual CartesianOrdering cartesian_ordering() const =0
returns the ordering used by this factory
virtual Integral * clone()=0
Clones the given Integral factory. The new factory may need to have set_basis and set_storage to be c...
virtual CartesianIter * new_cartesian_iter(int)=0
Return a CartesianIter object.
DEPRECATED Ref< typename TwoBodyIntEvalType< NumCenters >::value > grt()
Return a 2-body evaluator that computes two-electron integrals specific to linear R12 methods.
Definition integral.h:492
Ref< PetiteList > petite_list(const Ref< GaussianBasisSet > &)
Return the PetiteList object for the given basis set.
OneBodyInt is an abstract base class for objects that compute integrals between two basis functions.
Definition obint.h:49
OneBodyOneCenterInt is an abstract base class for objects that compute integrals between two basis fu...
Definition obint.h:124
RedundantCartesianIter objects loop through all possible combinations of a given number of axes.
Definition cartiter.h:82
Like RedundantCartesianIter, except a, b, and c are fixed to a given value.
Definition cartiter.h:172
A template class that maintains references counts.
Definition ref.h:361
Base class for objects that can save/restore state.
Definition state.h:45
Compute the transformation matrices that maps a set of Cartesian functions to another set of Cartesia...
Definition shellrot.h:39
Restores fundamental and user-defined types from images created with StateOut.
Definition statein.h:79
Serializes fundamental and user-defined types.
Definition stateout.h:71
The SymmetryOperation class provides a 3 by 3 matrix representation of a symmetry operation,...
Definition pointgrp.h:66
This is an abstract base type for classes that compute integrals involving two electrons and 2 functi...
Definition tbint.h:61
This is an abstract base type for classes that compute integrals involving two electrons in three Gau...
Definition tbint.h:191
This is an abstract base type for classes that compute integrals involving two electrons in two Gauss...
Definition tbint.h:305
Contains all MPQC code up to version 3.
Definition mpqcin.h:14
returns the type of the evaluator for evaluating this set of two-body integrals
Definition integral.h:60
returns the type of the evaluator for evaluating this set of two-body integrals
Definition tbint_batch.h:226
value
Definition nbint.h:49
Known two-body operator sets.
Definition operator.h:343
type
types of known two-body operators
Definition operator.h:318
Definition integral.h:103
Definition integral.h:102
Definition integral.h:100
Definition integral.h:101
Definition integral.h:104