integral.h

00001 //
00002 // integral.h --- definition of the Integral class
00003 //
00004 // Copyright (C) 1996 Limit Point Systems, Inc.
00005 //
00006 // Author: Edward Seidl <seidl@janed.com>
00007 // Maintainer: LPS
00008 //
00009 // This file is part of the SC Toolkit.
00010 //
00011 // The SC Toolkit is free software; you can redistribute it and/or modify
00012 // it under the terms of the GNU Library General Public License as published by
00013 // the Free Software Foundation; either version 2, or (at your option)
00014 // any later version.
00015 //
00016 // The SC Toolkit is distributed in the hope that it will be useful,
00017 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019 // GNU Library General Public License for more details.
00020 //
00021 // You should have received a copy of the GNU Library General Public License
00022 // along with the SC Toolkit; see the file COPYING.LIB.  If not, write to
00023 // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
00024 //
00025 // The U.S. Government is granted a limited license as per AL 91-7.
00026 //
00027 
00028 #ifndef _chemistry_qc_basis_integral_h
00029 #define _chemistry_qc_basis_integral_h
00030 
00031 #ifdef __GNUC__
00032 #pragma interface
00033 #endif
00034 
00035 #include <stddef.h>
00036 
00037 #include <util/state/state.h>
00038 #include <util/group/message.h>
00039 #include <chemistry/qc/basis/basis.h>
00040 #include <chemistry/qc/basis/obint.h>
00041 #include <chemistry/qc/basis/tbint.h>
00042 #include <chemistry/qc/basis/intparams.h>
00043 
00044 namespace sc {
00045 
00046 class SymmetryOperation;
00047 class RefSymmSCMatrix;
00048 class ShellRotation;
00049 class CartesianIter;
00050 class RedundantCartesianIter;
00051 class RedundantCartesianSubIter;
00052 class SphericalTransformIter;
00053 class SphericalTransform;
00054 class PointBag_double;
00055 class PetiteList;
00056 
00059 class Integral : public SavableState {
00060   protected:
00063     Integral(const Ref<GaussianBasisSet> &b1,
00064              const Ref<GaussianBasisSet> &b2,
00065              const Ref<GaussianBasisSet> &b3,
00066              const Ref<GaussianBasisSet> &b4);
00067     Ref<GaussianBasisSet> bs1_;
00068     Ref<GaussianBasisSet> bs2_;
00069     Ref<GaussianBasisSet> bs3_;
00070     Ref<GaussianBasisSet> bs4_;
00071 
00072     // the maximum number of bytes that should be used for
00073     // storing intermediates
00074     size_t storage_;
00075     size_t storage_used_;
00076 
00077     Ref<MessageGrp> grp_;
00078   public:
00080     Integral(StateIn&);
00082     Integral(const Ref<KeyVal>&);
00083 
00084     virtual ~Integral();
00085     
00086     void save_data_state(StateOut&);
00087 
00095     static Integral* initial_integral(int &argc, char **argv);
00097     static void set_default_integral(const Ref<Integral>&);
00099     static Integral* get_default_integral();
00101     virtual Integral* clone() =0;
00102 
00105     virtual int equiv(const Ref<Integral> &);
00106 
00108     virtual void set_storage(size_t i) { storage_=i; };
00110     size_t storage_used() { return storage_used_; }
00112     size_t storage_unused();
00115     virtual size_t storage_required_eri(const Ref<GaussianBasisSet> &b1,
00116                                         const Ref<GaussianBasisSet> &b2 = 0,
00117                                         const Ref<GaussianBasisSet> &b3 = 0,
00118                                         const Ref<GaussianBasisSet> &b4 = 0);
00121     virtual size_t storage_required_grt(const Ref<GaussianBasisSet> &b1,
00122                                         const Ref<GaussianBasisSet> &b2 = 0,
00123                                         const Ref<GaussianBasisSet> &b3 = 0,
00124                                         const Ref<GaussianBasisSet> &b4 = 0);
00127     virtual size_t storage_required_g12(const Ref<GaussianBasisSet> &b1,
00128                                         const Ref<GaussianBasisSet> &b2 = 0,
00129                                         const Ref<GaussianBasisSet> &b3 = 0,
00130                                         const Ref<GaussianBasisSet> &b4 = 0);
00133     virtual size_t storage_required_eri_deriv(const Ref<GaussianBasisSet> &b1,
00134                                               const Ref<GaussianBasisSet> &b2 = 0,
00135                                               const Ref<GaussianBasisSet> &b3 = 0,
00136                                               const Ref<GaussianBasisSet> &b4 = 0);
00137 
00140     void adjust_storage(ptrdiff_t s) { storage_used_ += s; }
00141 
00143     Ref<PetiteList> petite_list();
00145     Ref<PetiteList> petite_list(const Ref<GaussianBasisSet>&);
00148     ShellRotation shell_rotation(int am, SymmetryOperation&, int pure=0);
00149 
00151     virtual void set_basis(const Ref<GaussianBasisSet> &b1,
00152                            const Ref<GaussianBasisSet> &b2 = 0,
00153                            const Ref<GaussianBasisSet> &b3 = 0,
00154                            const Ref<GaussianBasisSet> &b4 = 0);
00155 
00156     // /////////////////////////////////////////////////////////////////////
00157     // the following must be defined in the specific integral package
00158 
00161     virtual CartesianIter * new_cartesian_iter(int) =0;
00164     virtual RedundantCartesianIter * new_redundant_cartesian_iter(int) =0;
00167     virtual RedundantCartesianSubIter*
00168                                  new_redundant_cartesian_sub_iter(int) =0;
00171     virtual SphericalTransformIter *
00172                   new_spherical_transform_iter(int l,
00173                                                int inv=0, int subl=-1) =0;
00176     virtual const SphericalTransform *
00177                   spherical_transform(int l,
00178                                       int inv=0, int subl=-1) =0;
00179     
00181     virtual Ref<OneBodyInt> overlap() =0;
00182     
00184     virtual Ref<OneBodyInt> kinetic() =0;
00185 
00188     virtual Ref<OneBodyInt> point_charge(const Ref<PointChargeData>&) =0;
00189 
00192     virtual Ref<OneBodyOneCenterInt> point_charge1(const Ref<PointChargeData>&);
00193 
00198     virtual Ref<OneBodyInt> nuclear() = 0;
00199 
00202     virtual Ref<OneBodyInt> p_dot_nuclear_p();
00203 
00208     virtual Ref<OneBodyInt> p_cross_nuclear_p();
00209 
00211     virtual Ref<OneBodyInt> hcore() = 0;
00212 
00215     virtual Ref<OneBodyInt> efield_dot_vector(const Ref<EfieldDotVectorData>&) =0;
00216 
00219     virtual Ref<OneBodyInt> dipole(const Ref<DipoleData>&) =0;
00220 
00223     virtual Ref<OneBodyInt> quadrupole(const Ref<DipoleData>&) =0;
00224 
00226     virtual Ref<OneBodyDerivInt> overlap_deriv() =0;
00227                                              
00229     virtual Ref<OneBodyDerivInt> kinetic_deriv() =0;
00230                                              
00232     virtual Ref<OneBodyDerivInt> nuclear_deriv() =0;
00233                                      
00235     virtual Ref<OneBodyDerivInt> hcore_deriv() =0;
00236 
00239     virtual Ref<TwoBodyThreeCenterInt> electron_repulsion3();
00240 
00243     virtual Ref<TwoBodyThreeCenterDerivInt> electron_repulsion3_deriv();
00244 
00247     virtual Ref<TwoBodyTwoCenterInt> electron_repulsion2();
00248 
00251     virtual Ref<TwoBodyTwoCenterDerivInt> electron_repulsion2_deriv();
00252 
00254     virtual Ref<TwoBodyInt> electron_repulsion();
00255 
00257     virtual Ref<TwoBodyDerivInt> electron_repulsion_deriv();
00258 
00265     virtual Ref<TwoBodyInt> grt();
00266     
00272     virtual Ref<TwoBodyInt> g12(const Ref<IntParamsG12>&);
00273     
00275     Ref<MessageGrp> messagegrp() { return grp_; }
00276 };
00277 
00278 }
00279 
00280 #endif
00281 
00282 // Local Variables:
00283 // mode: c++
00284 // c-file-style: "ETS"
00285 // End:

Generated at Wed Sep 5 14:02:29 2007 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.5.2.
These pages are hosted on SourceForge.net