MPQC
2.3.1
|
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 00043 namespace sc { 00044 00045 class SymmetryOperation; 00046 class RefSymmSCMatrix; 00047 class ShellRotation; 00048 class CartesianIter; 00049 class RedundantCartesianIter; 00050 class RedundantCartesianSubIter; 00051 class SphericalTransformIter; 00052 class SphericalTransform; 00053 class PointBag_double; 00054 class PetiteList; 00055 00058 class Integral : public SavableState { 00059 protected: 00062 Integral(const Ref<GaussianBasisSet> &b1, 00063 const Ref<GaussianBasisSet> &b2, 00064 const Ref<GaussianBasisSet> &b3, 00065 const Ref<GaussianBasisSet> &b4); 00066 Ref<GaussianBasisSet> bs1_; 00067 Ref<GaussianBasisSet> bs2_; 00068 Ref<GaussianBasisSet> bs3_; 00069 Ref<GaussianBasisSet> bs4_; 00070 00071 // the maximum number of bytes that should be used for 00072 // storing intermediates 00073 size_t storage_; 00074 size_t storage_used_; 00075 00076 Ref<MessageGrp> grp_; 00077 public: 00079 Integral(StateIn&); 00081 Integral(const Ref<KeyVal>&); 00082 00083 virtual ~Integral(); 00084 00085 void save_data_state(StateOut&); 00086 00094 static Integral* initial_integral(int &argc, char **argv); 00096 static void set_default_integral(const Ref<Integral>&); 00098 static Integral* get_default_integral(); 00100 virtual Integral* clone() =0; 00101 00104 virtual int equiv(const Ref<Integral> &); 00105 00107 void set_storage(size_t i) { storage_=i; }; 00109 size_t storage_used() { return storage_used_; } 00111 size_t storage_unused(); 00114 virtual size_t storage_required_eri(const Ref<GaussianBasisSet> &b1, 00115 const Ref<GaussianBasisSet> &b2 = 0, 00116 const Ref<GaussianBasisSet> &b3 = 0, 00117 const Ref<GaussianBasisSet> &b4 = 0); 00120 virtual size_t storage_required_grt(const Ref<GaussianBasisSet> &b1, 00121 const Ref<GaussianBasisSet> &b2 = 0, 00122 const Ref<GaussianBasisSet> &b3 = 0, 00123 const Ref<GaussianBasisSet> &b4 = 0); 00126 virtual size_t storage_required_eri_deriv(const Ref<GaussianBasisSet> &b1, 00127 const Ref<GaussianBasisSet> &b2 = 0, 00128 const Ref<GaussianBasisSet> &b3 = 0, 00129 const Ref<GaussianBasisSet> &b4 = 0); 00130 00133 void adjust_storage(ptrdiff_t s) { storage_used_ += s; } 00134 00136 Ref<PetiteList> petite_list(); 00138 Ref<PetiteList> petite_list(const Ref<GaussianBasisSet>&); 00141 ShellRotation shell_rotation(int am, SymmetryOperation&, int pure=0); 00142 00144 virtual void set_basis(const Ref<GaussianBasisSet> &b1, 00145 const Ref<GaussianBasisSet> &b2 = 0, 00146 const Ref<GaussianBasisSet> &b3 = 0, 00147 const Ref<GaussianBasisSet> &b4 = 0); 00148 00149 // ///////////////////////////////////////////////////////////////////// 00150 // the following must be defined in the specific integral package 00151 00154 virtual CartesianIter * new_cartesian_iter(int) =0; 00157 virtual RedundantCartesianIter * new_redundant_cartesian_iter(int) =0; 00160 virtual RedundantCartesianSubIter* 00161 new_redundant_cartesian_sub_iter(int) =0; 00164 virtual SphericalTransformIter * 00165 new_spherical_transform_iter(int l, 00166 int inv=0, int subl=-1) =0; 00169 virtual const SphericalTransform * 00170 spherical_transform(int l, 00171 int inv=0, int subl=-1) =0; 00172 00174 virtual Ref<OneBodyInt> overlap() =0; 00175 00177 virtual Ref<OneBodyInt> kinetic() =0; 00178 00181 virtual Ref<OneBodyInt> point_charge(const Ref<PointChargeData>&) =0; 00182 00185 virtual Ref<OneBodyOneCenterInt> point_charge1(const Ref<PointChargeData>&); 00186 00191 virtual Ref<OneBodyInt> nuclear() = 0; 00192 00194 virtual Ref<OneBodyInt> hcore() = 0; 00195 00198 virtual Ref<OneBodyInt> efield_dot_vector(const Ref<EfieldDotVectorData>&) =0; 00199 00202 virtual Ref<OneBodyInt> dipole(const Ref<DipoleData>&) =0; 00203 00206 virtual Ref<OneBodyInt> quadrupole(const Ref<DipoleData>&) =0; 00207 00209 virtual Ref<OneBodyDerivInt> overlap_deriv() =0; 00210 00212 virtual Ref<OneBodyDerivInt> kinetic_deriv() =0; 00213 00215 virtual Ref<OneBodyDerivInt> nuclear_deriv() =0; 00216 00218 virtual Ref<OneBodyDerivInt> hcore_deriv() =0; 00219 00222 virtual Ref<TwoBodyThreeCenterInt> electron_repulsion3(); 00223 00226 virtual Ref<TwoBodyThreeCenterDerivInt> electron_repulsion3_deriv(); 00227 00230 virtual Ref<TwoBodyTwoCenterInt> electron_repulsion2(); 00231 00234 virtual Ref<TwoBodyTwoCenterDerivInt> electron_repulsion2_deriv(); 00235 00237 virtual Ref<TwoBodyInt> electron_repulsion() =0; 00238 00240 virtual Ref<TwoBodyDerivInt> electron_repulsion_deriv() =0; 00241 00248 virtual Ref<TwoBodyInt> grt(); 00249 00251 Ref<MessageGrp> messagegrp() { return grp_; } 00252 }; 00253 00254 } 00255 00256 #endif 00257 00258 // Local Variables: 00259 // mode: c++ 00260 // c-file-style: "ETS" 00261 // End: