Main Page Class Hierarchy Compound List File List Compound Members Related Pages

# int1e.h

    00001 //
    00002 // int1e.h
    00003 //
    00004 // Copyright (C) 1996 Limit Point Systems, Inc.
    00005 //
    00006 // Author: Curtis Janssen <cljanss@limitpt.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 #ifdef __GNUG__
    00029 #pragma interface
    00030 #endif
    00031
    00032 #ifndef _chemistry_qc_int1e_h
    00033 #define _chemistry_qc_int1e_h
    00034
    00035 #include <util/ref/ref.h>
    00036 #include <chemistry/qc/basis/basis.h>
    00037 #include <chemistry/qc/intv3/fjt.h>
    00038 #include <chemistry/qc/intv3/array.h>
    00039
    00040 namespace sc {
    00041
    00042 class Integral;
    00043
    00047 class Int1eV3: public RefCount {
    00048   protected:
    00049     Integral *integral_;
    00050
    00051     Ref<GaussianBasisSet> bs1_;
    00052     Ref<GaussianBasisSet> bs2_;
    00053     double *fjttable_;
    00054     Ref<FJT> fjt_;
    00055     int bs1_shell_offset_;
    00056     int bs2_shell_offset_;
    00057     int bs1_func_offset_;
    00058     int bs2_func_offset_;
    00059     int bs1_prim_offset_;
    00060     int bs2_prim_offset_;
    00061
    00062     // statics from comp_1e.c:
    00063   protected:
    00064     double oo2zeta_a;
    00065     double oo2zeta_b;
    00066     double sMus[3];
    00067     double sTs;
    00068     double xi;
    00069     double A[3];
    00070     double B[3];
    00071     double C[3];
    00072     double ss;
    00073     double PmA[3];
    00074     double PmB[3];
    00075     double PmC[3];
    00076     double zeta;
    00077     double oo2zeta;
    00078     GaussianShell *gshell1, *gshell2;
    00079     int exponent_weighted;
    00080     int scale_shell_result;
    00081     double result_scale_factor;
    00082     int three_center;
    00083     Ref<GaussianBasisSet> third_centers;
    00084     int third_centernum;
    00085     int init_order;
    00086     double *buff;
    00087     double *cartesianbuffer;
    00088     double *cartesianbuffer_scratch;
    00089     int mu;
    00090     IntV3Arraydoublep3 inter;
    00091     IntV3Arraydoublep3 efield_inter;
    00092
    00093   protected:
    00094     void accum_shell_1der(
    00095         double *buff, int ish, int jsh,
    00096         Ref<GaussianBasisSet> dercs, int centernum,
    00097         double (Int1eV3::*)(int,int,int,int,int,int,int,int)
    00098         );
    00099     void accum_shell_block_1der(
    00100         double *buff, int ish, int jsh,
    00101         Ref<GaussianBasisSet> dercs, int centernum,
    00102         void (Int1eV3::*shell_block_function)
    00103                                   (int gc1, int a, int gc2, int b,
    00104                                    int gcsize2, int gcoff1, int gcoff2,
    00105                                    double coef, double *buffer)
    00106         );
    00107     double comp_shell_overlap(int gc1, int i1, int j1, int k1,
    00108                               int gc2, int i2, int j2, int k2);
    00109     double comp_prim_overlap(int i1, int j1, int k1,
    00110                              int i2, int j2, int k2);
    00111     double comp_shell_kinetic(int gc1, int i1, int j1, int k1,
    00112                               int gc2, int i2, int j2, int k2);
    00113     double comp_prim_kinetic(int i1, int j1, int k1,
    00114                              int i2, int j2, int k2);
    00115     double comp_shell_nuclear(int gc1, int i1, int j1, int k1,
    00116                               int gc2, int i2, int j2, int k2);
    00117     void accum_shell_efield(double *buff, int ish, int jsh);
    00118     void accum_shell_block_efield(double *buff, int ish, int jsh);
    00119     double comp_prim_nuclear(int i1, int j1, int k1,
    00120                              int i2, int j2, int k2, int m);
    00121     void comp_shell_efield(double *efield,
    00122                            int gc1, int i1, int j1, int k1,
    00123                            int gc2, int i2, int j2, int k2);
    00124     void comp_shell_block_efield(int gc1, int a, int gc2, int b,
    00125                                  int gcsize2, int gcoff1, int gcoff2,
    00126                                  double coef, double *buffer);
    00127     double comp_prim_efield(int xyz, int i1, int j1, int k1,
    00128                             int i2, int j2, int k2, int m);
    00129     void comp_shell_dipole(double* dipole,
    00130                            int gc1, int i1, int j1, int k1,
    00131                            int gc2, int i2, int j2, int k2);
    00132     double comp_prim_dipole(int axis,
    00133                             int i1, int j1, int k1,
    00134                             int i2, int j2, int k2);
    00135     void comp_shell_block_nuclear(int gc1, int a, int gc2, int b,
    00136                                   int gcsize2, int gcoff1, int gcoff2,
    00137                                   double coef, double *buffer);
    00138     void comp_prim_block_nuclear(int a, int b);
    00139     void comp_prim_block_nuclear_build_a(int a, int b, int m);
    00140     void comp_prim_block_nuclear_build_b(int b, int m);
    00141     void comp_prim_block_efield(int a, int b);
    00142     void comp_prim_block_efield_build_a(int a, int b, int m);
    00143     void comp_prim_block_efield_build_b(int b, int m);
    00144     // routines from comp_1e:
    00145   protected:
    00146     void int_accum_shell_overlap_1der(int ish, int jsh,
    00147                                       Ref<GaussianBasisSet> dercs,
    00148                                       int centernum);
    00149     void int_done_1e();
    00150     void int_initialize_1e(int flags, int order);
    00151 #if 0
    00152     double int_prim_overlap(shell_t *pshell1, shell_t *pshell2,
    00153                             double *pA, double *pB,
    00154                             int prim1, int prim2,
    00155                             int i1, int j1, int k1,
    00156                             int i2, int j2, int k2);
    00157 #endif
    00158     void int_accum_shell_kinetic(int ish, int jsh);
    00159     void int_accum_shell_kinetic_1der(int ish, int jsh,
    00160                                       Ref<GaussianBasisSet> dercs,
    00161                                       int centernum);
    00162     void int_accum_shell_nuclear_1der(int ish, int jsh,
    00163                                       Ref<GaussianBasisSet> dercs,
    00164                                       int centernum);
    00165     void int_accum_shell_nuclear_hfc_1der(int ish, int jsh,
    00166                                           Ref<GaussianBasisSet> dercs,
    00167                                           int centernum);
    00168     void int_accum_shell_nuclear_hf_1der(int ish, int jsh,
    00169                                          Ref<GaussianBasisSet> dercs,
    00170                                          int centernum);
    00171     void int_accum_shell_nuclear_nonhf_1der(int ish, int jsh,
    00172                                             Ref<GaussianBasisSet> dercs,
    00173                                             int centernum);
    00174     void int_accum_shell_efield(int ish, int jsh,
    00175                                 double *position);
    00176     void int_accum_shell_point_charge(int ish, int jsh,
    00177                                       int ncharge, const double* charge,
    00178                                       const double*const* position);
    00179     void int_shell_nuclear_hf_1der(int ish, int jsh,
    00180                                    Ref<GaussianBasisSet> dercs,
    00181                                    int centernum);
    00182     void int_shell_nuclear_nonhf_1der(int ish, int jsh,
    00183                                       Ref<GaussianBasisSet> dercs,
    00184                                       int centernum);
    00185     void int_accum_shell_dipole(int ish, int jsh,
    00186                                 double *com);
    00187
    00188     // from offsets.cc
    00189   protected:
    00190     void int_initialize_offsets1();
    00191     void int_done_offsets1();
    00192
    00193     // from tformv3.cc
    00194   protected:
    00195     double *source;
    00196     int nsourcemax;
    00197     // transform implementation functions:
    00198     void transform_init();
    00199     void transform_done();
    00200     void source_space(int nsource);
    00201     void copy_to_source(double *integrals, int nsource);
    00202     void do_transform_1e(Integral *integ,
    00203                          double *integrals,
    00204                          GaussianShell *sh1, GaussianShell *sh2,
    00205                          int chunk);
    00206     void transform_1e(Integral *integ,
    00207                       double *integrals, double *target,
    00208                       GaussianShell *sh1, GaussianShell *sh2, int chunk);
    00209     void accum_transform_1e(Integral *integ,
    00210                             double *integrals, double *target,
    00211                             GaussianShell *sh1, GaussianShell *sh2, int chunk);
    00212
    00213     // functions for general use outside of tformv3.cc:
    00214     void transform_1e(Integral*integ,
    00215                       double *integrals, double *target,
    00216                       GaussianShell *sh1, GaussianShell *sh2);
    00217     void accum_transform_1e(Integral*integ,
    00218                             double *integrals, double *target,
    00219                             GaussianShell *sh1, GaussianShell *sh2);
    00220     void transform_1e_xyz(Integral*integ,
    00221                           double *integrals, double *target,
    00222                           GaussianShell *sh1, GaussianShell *sh2);
    00223     void accum_transform_1e_xyz(Integral*integ,
    00224                                 double *integrals, double *target,
    00225                                 GaussianShell *sh1, GaussianShell *sh2);
    00226
    00227   public:
    00228     Int1eV3(Integral *,
    00229             const Ref<GaussianBasisSet>&,
    00230             const Ref<GaussianBasisSet>&,
    00231             int order);
    00232     ~Int1eV3();
    00233
    00234     double *buffer() { return buff; }
    00235     Ref<GaussianBasisSet> basis() { if (bs1_==bs2_) return bs1_; return 0; }
    00236     Ref<GaussianBasisSet> basis1() { return bs1_; }
    00237     Ref<GaussianBasisSet> basis2() { return bs2_; }
    00238
    00239     void kinetic(int ish, int jsh);
    00240     void nuclear_slow(int ish, int jsh);
    00241     void nuclear(int ish, int jsh);
    00242     void overlap(int ish, int jsh);
    00243     void hcore(int ish, int jsh);
    00244     void efield(int ish, int jsh, double position[3]);
    00245     void point_charge(int ish, int jsh,
    00246                       int ncharge, const double* charge,
    00247                       const double*const* position);
    00248     void dipole(int ish, int jsh,
    00249                 double *com);
    00250
    00251     void hcore_1der(int ish, int jsh,
    00252                     int dercs, int centernum);
    00253     void kinetic_1der(int ish, int jsh,
    00254                       int dercs, int centernum);
    00255     void nuclear_1der(int ish, int jsh,
    00256                       int dercs, int centernum);
    00257     void overlap_1der(int ish, int jsh,
    00258                       int dercs, int centernum);
    00259 };
    00260
    00261 }
    00262
    00263 #endif
    00264
    00265 // Local Variables:
    00266 // mode: c++
    00267 // c-file-style: "CLJ"
    00268 // End: