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