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 
43 namespace sc {
44 
45 class SymmetryOperation;
46 class RefSymmSCMatrix;
47 class ShellRotation;
48 class CartesianIter;
49 class RedundantCartesianIter;
50 class RedundantCartesianSubIter;
51 class SphericalTransformIter;
52 class SphericalTransform;
53 class PointBag_double;
54 class PetiteList;
55 
58 class 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:
79  Integral(StateIn&);
81  Integral(const Ref<KeyVal>&);
82 
83  virtual ~Integral();
84 
86 
94  static Integral* initial_integral(int &argc, char **argv);
96  static void set_default_integral(const Ref<Integral>&);
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_; }
111  size_t storage_unused();
114  virtual size_t storage_required_eri(const Ref<GaussianBasisSet> &b1,
115  const Ref<GaussianBasisSet> &b2 = 0,
116  const Ref<GaussianBasisSet> &b3 = 0,
117  const Ref<GaussianBasisSet> &b4 = 0);
120  virtual size_t storage_required_grt(const Ref<GaussianBasisSet> &b1,
121  const Ref<GaussianBasisSet> &b2 = 0,
122  const Ref<GaussianBasisSet> &b3 = 0,
123  const Ref<GaussianBasisSet> &b4 = 0);
126  virtual size_t storage_required_eri_deriv(const Ref<GaussianBasisSet> &b1,
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 
141  ShellRotation shell_rotation(int am, SymmetryOperation&, int pure=0);
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 
154  virtual CartesianIter * new_cartesian_iter(int) =0;
164  virtual SphericalTransformIter *
166  int inv=0, int subl=-1) =0;
169  virtual const SphericalTransform *
170  spherical_transform(int l,
171  int inv=0, int subl=-1) =0;
172 
174  virtual Ref<OneBodyInt> overlap() =0;
175 
177  virtual Ref<OneBodyInt> kinetic() =0;
178 
182 
186 
191  virtual Ref<OneBodyInt> nuclear() = 0;
192 
194  virtual Ref<OneBodyInt> hcore() = 0;
195 
199 
202  virtual Ref<OneBodyInt> dipole(const Ref<DipoleData>&) =0;
203 
206  virtual Ref<OneBodyInt> quadrupole(const Ref<DipoleData>&) =0;
207 
209  virtual Ref<OneBodyDerivInt> overlap_deriv() =0;
210 
212  virtual Ref<OneBodyDerivInt> kinetic_deriv() =0;
213 
215  virtual Ref<OneBodyDerivInt> nuclear_deriv() =0;
216 
218  virtual Ref<OneBodyDerivInt> hcore_deriv() =0;
219 
223 
227 
231 
235 
237  virtual Ref<TwoBodyInt> electron_repulsion() =0;
238 
241 
248  virtual Ref<TwoBodyInt> grt();
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:
sc::Integral::point_charge1
virtual Ref< OneBodyOneCenterInt > point_charge1(const Ref< PointChargeData > &)
Return a OneBodyInt that computes the integrals for interactions with point charges.
sc::Integral::kinetic_deriv
virtual Ref< OneBodyDerivInt > kinetic_deriv()=0
Return a OneBodyDerivInt that computes kinetic energy derivatives.
sc::Integral::efield_dot_vector
virtual Ref< OneBodyInt > efield_dot_vector(const Ref< EfieldDotVectorData > &)=0
Return a OneBodyInt that computes the electric field integrals dotted with a given vector.
sc::Integral::storage_required_eri
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...
sc::RedundantCartesianIter
RedundantCartesianIter objects loop through all possible combinations of a given number of axes.
Definition: cartiter.h:80
sc::Integral::nuclear_deriv
virtual Ref< OneBodyDerivInt > nuclear_deriv()=0
Return a OneBodyDerivInt that computes nuclear repulsion derivatives.
sc::Integral::messagegrp
Ref< MessageGrp > messagegrp()
Return the MessageGrp used by the integrals objects.
Definition: integral.h:251
sc::Integral::storage_required_eri_deriv
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...
sc::Integral::quadrupole
virtual Ref< OneBodyInt > quadrupole(const Ref< DipoleData > &)=0
Return a OneBodyInt that computes electric quadrupole moment integrals.
sc::Integral::initial_integral
static Integral * initial_integral(int &argc, char **argv)
Create an integral factory.
sc::Integral::overlap
virtual Ref< OneBodyInt > overlap()=0
Return a OneBodyInt that computes the overlap.
sc::SymmetryOperation
The SymmetryOperation class provides a 3 by 3 matrix representation of a symmetry operation,...
Definition: pointgrp.h:70
sc::CartesianIter
CartesianIter gives the ordering of the Cartesian functions within a shell for the particular integra...
Definition: cartiter.h:39
sc::ShellRotation
Compute the transformation matrices that maps a set of Cartesian functions to another set of Cartesia...
Definition: shellrot.h:43
sc::Ref< GaussianBasisSet >
sc::Integral::new_cartesian_iter
virtual CartesianIter * new_cartesian_iter(int)=0
Return a CartesianIter object.
sc::Integral::electron_repulsion
virtual Ref< TwoBodyInt > electron_repulsion()=0
Return a TwoBodyInt that computes electron repulsion integrals.
sc::Integral::set_basis
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.
sc::Integral::adjust_storage
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
sc::Integral::set_storage
void set_storage(size_t i)
Sets the total amount of storage, in bytes, that is available.
Definition: integral.h:107
sc::Integral::equiv
virtual int equiv(const Ref< Integral > &)
Returns nonzero if this and the given Integral object have the same integral ordering,...
sc::Integral::overlap_deriv
virtual Ref< OneBodyDerivInt > overlap_deriv()=0
Return a OneBodyDerivInt that computes overlap derivatives.
sc::Integral::grt
virtual Ref< TwoBodyInt > grt()
Return a TwoBodyInt that computes two-electron integrals specific to linear R12 methods.
sc::RedundantCartesianSubIter
Like RedundantCartesianIter, except a, b, and c are fixed to a given value.
Definition: cartiter.h:170
sc::Integral::save_data_state
void save_data_state(StateOut &)
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR ...
sc::Integral::electron_repulsion2_deriv
virtual Ref< TwoBodyTwoCenterDerivInt > electron_repulsion2_deriv()
Return a TwoBodyTwoCenterInt that computes electron repulsion integrals.
sc::Integral::new_redundant_cartesian_iter
virtual RedundantCartesianIter * new_redundant_cartesian_iter(int)=0
Return a RedundantCartesianIter object.
sc::Integral::petite_list
Ref< PetiteList > petite_list()
Return the PetiteList object.
sc::Integral::set_default_integral
static void set_default_integral(const Ref< Integral > &)
Specifies a new default Integral factory.
sc::SphericalTransformIter
This iterates through the components of a SphericalTransform.
Definition: chemistry/qc/basis/transform.h:138
sc::Integral::kinetic
virtual Ref< OneBodyInt > kinetic()=0
Return a OneBodyInt that computes the kinetic energy.
sc::StateIn
Restores objects that derive from SavableState.
Definition: statein.h:70
sc::Integral::storage_used
size_t storage_used()
Returns how much storage has been used.
Definition: integral.h:109
sc::Integral::point_charge
virtual Ref< OneBodyInt > point_charge(const Ref< PointChargeData > &)=0
Return a OneBodyInt that computes the integrals for interactions with point charges.
sc::Integral::get_default_integral
static Integral * get_default_integral()
Returns the default Integral factory.
sc::Integral::electron_repulsion_deriv
virtual Ref< TwoBodyDerivInt > electron_repulsion_deriv()=0
Return a TwoBodyDerivInt that computes electron repulsion derivatives.
sc::Integral::new_redundant_cartesian_sub_iter
virtual RedundantCartesianSubIter * new_redundant_cartesian_sub_iter(int)=0
Return a RedundantCartesianSubIter object.
sc::Integral::hcore
virtual Ref< OneBodyInt > hcore()=0
Return a OneBodyInt that computes the core Hamiltonian integrals.
sc::Integral
The Integral abstract class acts as a factory to provide objects that compute one and two electron in...
Definition: integral.h:58
sc::StateOut
Serializes objects that derive from SavableState.
Definition: stateout.h:61
sc::SphericalTransform
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
sc::Integral::Integral
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.
sc::Integral::electron_repulsion3_deriv
virtual Ref< TwoBodyThreeCenterDerivInt > electron_repulsion3_deriv()
Return a TwoBodyThreeCenterInt that computes electron repulsion integrals.
sc::Integral::new_spherical_transform_iter
virtual SphericalTransformIter * new_spherical_transform_iter(int l, int inv=0, int subl=-1)=0
Return a SphericalTransformIter object.
sc::Integral::hcore_deriv
virtual Ref< OneBodyDerivInt > hcore_deriv()=0
Return a OneBodyDerivInt that computes core Hamiltonian derivatives.
sc::Integral::nuclear
virtual Ref< OneBodyInt > nuclear()=0
Return a OneBodyInt that computes the nuclear repulsion integrals.
sc::Integral::shell_rotation
ShellRotation shell_rotation(int am, SymmetryOperation &, int pure=0)
Return the ShellRotation object for a shell of the given angular momentum.
sc::Integral::storage_required_grt
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...
sc::SavableState
Base class for objects that can save/restore state.
Definition: state.h:46
sc::Integral::spherical_transform
virtual const SphericalTransform * spherical_transform(int l, int inv=0, int subl=-1)=0
Return a SphericalTransform object.
sc::Integral::electron_repulsion3
virtual Ref< TwoBodyThreeCenterInt > electron_repulsion3()
Return a TwoBodyThreeCenterInt that computes electron repulsion integrals.
sc::Integral::electron_repulsion2
virtual Ref< TwoBodyTwoCenterInt > electron_repulsion2()
Return a TwoBodyTwoCenterInt that computes electron repulsion integrals.
sc::Integral::clone
virtual Integral * clone()=0
Clones the given Integral factory. The new factory may need to have set_basis and set_storage to be c...
sc::Integral::storage_unused
size_t storage_unused()
Returns how much storage was not needed.
sc::Integral::dipole
virtual Ref< OneBodyInt > dipole(const Ref< DipoleData > &)=0
Return a OneBodyInt that computes electric dipole moment integrals.

Generated at Sun Jan 26 2020 23:33:03 for MPQC 2.3.1 using the documentation package Doxygen 1.8.16.