MPQC 2.3.1
integral.h
1//
2// integral.h --- definition of the Integral class
3//
4// Copyright (C) 1996 Limit Point Systems, Inc.
5//
6// Author: Edward Seidl <seidl@janed.com>
7// Maintainer: LPS
8//
9// This file is part of the SC Toolkit.
10//
11// The SC Toolkit is free software; you can redistribute it and/or modify
12// it under the terms of the GNU Library General Public License as published by
13// the Free Software Foundation; either version 2, or (at your option)
14// any later version.
15//
16// The SC Toolkit is distributed in the hope that it will be useful,
17// but WITHOUT ANY WARRANTY; without even the implied warranty of
18// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19// GNU Library General Public License for more details.
20//
21// You should have received a copy of the GNU Library General Public License
22// along with the SC Toolkit; see the file COPYING.LIB. If not, write to
23// the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
24//
25// The U.S. Government is granted a limited license as per AL 91-7.
26//
27
28#ifndef _chemistry_qc_basis_integral_h
29#define _chemistry_qc_basis_integral_h
30
31#ifdef __GNUC__
32#pragma interface
33#endif
34
35#include <stddef.h>
36
37#include <util/state/state.h>
38#include <util/group/message.h>
39#include <chemistry/qc/basis/basis.h>
40#include <chemistry/qc/basis/obint.h>
41#include <chemistry/qc/basis/tbint.h>
42
43namespace sc {
44
45class SymmetryOperation;
46class RefSymmSCMatrix;
47class ShellRotation;
48class CartesianIter;
49class RedundantCartesianIter;
50class RedundantCartesianSubIter;
51class SphericalTransformIter;
52class SphericalTransform;
53class PointBag_double;
54class PetiteList;
55
58class Integral : public SavableState {
59 protected:
63 const Ref<GaussianBasisSet> &b2,
64 const Ref<GaussianBasisSet> &b3,
65 const Ref<GaussianBasisSet> &b4);
70
71 // the maximum number of bytes that should be used for
72 // storing intermediates
73 size_t storage_;
74 size_t storage_used_;
75
76 Ref<MessageGrp> grp_;
77 public:
82
83 virtual ~Integral();
84
86
94 static Integral* initial_integral(int &argc, char **argv);
100 virtual Integral* clone() =0;
101
104 virtual int equiv(const Ref<Integral> &);
105
107 void set_storage(size_t i) { storage_=i; };
109 size_t storage_used() { return storage_used_; }
115 const Ref<GaussianBasisSet> &b2 = 0,
116 const Ref<GaussianBasisSet> &b3 = 0,
117 const Ref<GaussianBasisSet> &b4 = 0);
121 const Ref<GaussianBasisSet> &b2 = 0,
122 const Ref<GaussianBasisSet> &b3 = 0,
123 const Ref<GaussianBasisSet> &b4 = 0);
127 const Ref<GaussianBasisSet> &b2 = 0,
128 const Ref<GaussianBasisSet> &b3 = 0,
129 const Ref<GaussianBasisSet> &b4 = 0);
130
133 void adjust_storage(ptrdiff_t s) { storage_used_ += s; }
134
142
144 virtual void set_basis(const Ref<GaussianBasisSet> &b1,
145 const Ref<GaussianBasisSet> &b2 = 0,
146 const Ref<GaussianBasisSet> &b3 = 0,
147 const Ref<GaussianBasisSet> &b4 = 0);
148
149 // /////////////////////////////////////////////////////////////////////
150 // the following must be defined in the specific integral package
151
164 virtual SphericalTransformIter *
166 int inv=0, int subl=-1) =0;
169 virtual const SphericalTransform *
171 int inv=0, int subl=-1) =0;
172
175
178
182
186
192
194 virtual Ref<OneBodyInt> hcore() = 0;
195
199
203
207
210
213
216
219
223
227
231
235
238
241
249
251 Ref<MessageGrp> messagegrp() { return grp_; }
252};
253
254}
255
256#endif
257
258// Local Variables:
259// mode: c++
260// c-file-style: "ETS"
261// End:
CartesianIter gives the ordering of the Cartesian functions within a shell for the particular integra...
Definition cartiter.h:39
The Integral abstract class acts as a factory to provide objects that compute one and two electron in...
Definition integral.h:58
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.
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_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...
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< 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.
virtual Ref< TwoBodyTwoCenterInt > electron_repulsion2()
Return a TwoBodyTwoCenterInt that computes electron repulsion integrals.
static Integral * get_default_integral()
Returns the default Integral factory.
virtual Ref< TwoBodyThreeCenterInt > electron_repulsion3()
Return a TwoBodyThreeCenterInt that computes electron repulsion integrals.
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 Ref< OneBodyInt > quadrupole(const Ref< DipoleData > &)=0
Return a OneBodyInt that computes electric quadrupole moment integrals.
virtual const SphericalTransform * spherical_transform(int l, int inv=0, int subl=-1)=0
Return a SphericalTransform object.
void adjust_storage(ptrdiff_t s)
The specific integral classes use this to tell Integral how much memory they are using/freeing.
Definition integral.h:133
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 ...
virtual Ref< OneBodyInt > dipole(const Ref< DipoleData > &)=0
Return a OneBodyInt that computes electric dipole moment integrals.
virtual Ref< TwoBodyInt > grt()
Return a TwoBodyInt that computes two-electron integrals specific to linear R12 methods.
virtual SphericalTransformIter * new_spherical_transform_iter(int l, int inv=0, int subl=-1)=0
Return a SphericalTransformIter object.
virtual Ref< OneBodyDerivInt > nuclear_deriv()=0
Return a OneBodyDerivInt that computes nuclear repulsion derivatives.
size_t storage_unused()
Returns how much storage was not needed.
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.
size_t storage_used()
Returns how much storage has been used.
Definition integral.h:109
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...
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.
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.
void set_storage(size_t i)
Sets the total amount of storage, in bytes, that is available.
Definition integral.h:107
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.
virtual Ref< OneBodyInt > nuclear()=0
Return a OneBodyInt that computes the nuclear repulsion integrals.
Ref< MessageGrp > messagegrp()
Return the MessageGrp used by the integrals objects.
Definition integral.h:251
virtual Ref< TwoBodyDerivInt > electron_repulsion_deriv()=0
Return a TwoBodyDerivInt that computes electron repulsion derivatives.
virtual Ref< OneBodyOneCenterInt > point_charge1(const Ref< PointChargeData > &)
Return a OneBodyInt that computes the integrals for interactions with point charges.
virtual Ref< TwoBodyInt > electron_repulsion()=0
Return a TwoBodyInt that computes electron repulsion integrals.
virtual Ref< OneBodyInt > efield_dot_vector(const Ref< EfieldDotVectorData > &)=0
Return a OneBodyInt that computes the electric field integrals dotted with a given vector.
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.
Ref< PetiteList > petite_list(const Ref< GaussianBasisSet > &)
Return the PetiteList object for the given basis set.
RedundantCartesianIter objects loop through all possible combinations of a given number of axes.
Definition cartiter.h:80
Like RedundantCartesianIter, except a, b, and c are fixed to a given value.
Definition cartiter.h:170
A template class that maintains references counts.
Definition ref.h:332
Base class for objects that can save/restore state.
Definition state.h:46
Compute the transformation matrices that maps a set of Cartesian functions to another set of Cartesia...
Definition shellrot.h:43
This iterates through the components of a SphericalTransform.
Definition chemistry/qc/basis/transform.h:138
This is a base class for a container for a sparse Cartesian to solid harmonic basis function transfor...
Definition chemistry/qc/basis/transform.h:75
Restores objects that derive from SavableState.
Definition statein.h:70
Serializes objects that derive from SavableState.
Definition stateout.h:61
The SymmetryOperation class provides a 3 by 3 matrix representation of a symmetry operation,...
Definition pointgrp.h:70

Generated at Fri Jan 31 2025 00:00:00 for MPQC 2.3.1 using the documentation package Doxygen 1.12.0.