MPQC  2.3.1
intv3/int1e.h
1 //
2 // int1e.h
3 //
4 // Copyright (C) 1996 Limit Point Systems, Inc.
5 //
6 // Author: Curtis Janssen <cljanss@limitpt.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 #ifdef __GNUG__
29 #pragma interface
30 #endif
31 
32 #ifndef _chemistry_qc_int1e_h
33 #define _chemistry_qc_int1e_h
34 
35 #include <util/ref/ref.h>
36 #include <chemistry/qc/basis/basis.h>
37 #include <chemistry/qc/intv3/fjt.h>
38 #include <chemistry/qc/intv3/array.h>
39 
40 namespace sc {
41 
42 class Integral;
43 
47 class Int1eV3: public RefCount {
48  protected:
49  Integral *integral_;
50 
53  double *fjttable_;
54  Ref<FJT> fjt_;
55  int bs1_shell_offset_;
56  int bs2_shell_offset_;
57  int bs1_func_offset_;
58  int bs2_func_offset_;
59  int bs1_prim_offset_;
60  int bs2_prim_offset_;
61 
62  // statics from comp_1e.c:
63  protected:
64  double oo2zeta_a;
65  double oo2zeta_b;
66  double sMus[3];
67  double sTs;
68  double xi;
69  double A[3];
70  double B[3];
71  double C[3];
72  double ss;
73  double PmA[3];
74  double PmB[3];
75  double PmC[3];
76  double zeta;
77  double oo2zeta;
78  GaussianShell *gshell1, *gshell2;
79  int exponent_weighted;
80  int scale_shell_result;
81  double result_scale_factor;
82  int three_center;
83  Ref<GaussianBasisSet> third_centers;
84  int third_centernum;
85  int init_order;
86  double *buff;
87  double *cartesianbuffer;
88  double *cartesianbuffer_scratch;
89  int mu;
90  IntV3Arraydoublep3 inter;
91  IntV3Arraydoublep3 efield_inter;
92 
93  protected:
94  void accum_shell_1der(
95  double *buff, int ish, int jsh,
96  Ref<GaussianBasisSet> dercs, int centernum,
97  double (Int1eV3::*)(int,int,int,int,int,int,int,int)
98  );
99  void accum_shell_block_1der(
100  double *buff, int ish, int jsh,
101  Ref<GaussianBasisSet> dercs, int centernum,
102  void (Int1eV3::*shell_block_function)
103  (int gc1, int a, int gc2, int b,
104  int gcsize2, int gcoff1, int gcoff2,
105  double coef, double *buffer)
106  );
107  double comp_shell_overlap(int gc1, int i1, int j1, int k1,
108  int gc2, int i2, int j2, int k2);
109  double comp_prim_overlap(int i1, int j1, int k1,
110  int i2, int j2, int k2);
111  double comp_shell_kinetic(int gc1, int i1, int j1, int k1,
112  int gc2, int i2, int j2, int k2);
113  double comp_prim_kinetic(int i1, int j1, int k1,
114  int i2, int j2, int k2);
115  double comp_shell_nuclear(int gc1, int i1, int j1, int k1,
116  int gc2, int i2, int j2, int k2);
117  void accum_shell_efield(double *buff, int ish, int jsh);
118  void accum_shell_block_efield(double *buff, int ish, int jsh);
119  double comp_prim_nuclear(int i1, int j1, int k1,
120  int i2, int j2, int k2, int m);
121  void comp_shell_efield(double *efield,
122  int gc1, int i1, int j1, int k1,
123  int gc2, int i2, int j2, int k2);
124  void comp_shell_block_efield(int gc1, int a, int gc2, int b,
125  int gcsize2, int gcoff1, int gcoff2,
126  double coef, double *buffer);
127  double comp_prim_efield(int xyz, int i1, int j1, int k1,
128  int i2, int j2, int k2, int m);
129  void comp_shell_dipole(double* dipole,
130  int gc1, int i1, int j1, int k1,
131  int gc2, int i2, int j2, int k2);
132  double comp_prim_dipole(int axis,
133  int i1, int j1, int k1,
134  int i2, int j2, int k2);
135  void comp_shell_block_nuclear(int gc1, int a, int gc2, int b,
136  int gcsize2, int gcoff1, int gcoff2,
137  double coef, double *buffer);
138  void comp_prim_block_nuclear(int a, int b);
139  void comp_prim_block_nuclear_build_a(int a, int b, int m);
140  void comp_prim_block_nuclear_build_b(int b, int m);
141  void comp_prim_block_efield(int a, int b);
142  void comp_prim_block_efield_build_a(int a, int b, int m);
143  void comp_prim_block_efield_build_b(int b, int m);
144  // routines from comp_1e:
145  protected:
146  void int_accum_shell_overlap_1der(int ish, int jsh,
147  Ref<GaussianBasisSet> dercs,
148  int centernum);
149  void int_done_1e();
150  void int_initialize_1e(int flags, int order);
151 #if 0
152  double int_prim_overlap(shell_t *pshell1, shell_t *pshell2,
153  double *pA, double *pB,
154  int prim1, int prim2,
155  int i1, int j1, int k1,
156  int i2, int j2, int k2);
157 #endif
158  void int_accum_shell_kinetic(int ish, int jsh);
159  void int_accum_shell_kinetic_1der(int ish, int jsh,
160  Ref<GaussianBasisSet> dercs,
161  int centernum);
162  void int_accum_shell_nuclear_1der(int ish, int jsh,
163  Ref<GaussianBasisSet> dercs,
164  int centernum);
165  void int_accum_shell_nuclear_hfc_1der(int ish, int jsh,
166  Ref<GaussianBasisSet> dercs,
167  int centernum);
168  void int_accum_shell_nuclear_hf_1der(int ish, int jsh,
169  Ref<GaussianBasisSet> dercs,
170  int centernum);
171  void int_accum_shell_nuclear_nonhf_1der(int ish, int jsh,
172  Ref<GaussianBasisSet> dercs,
173  int centernum);
174  void int_accum_shell_efield(int ish, int jsh,
175  double *position);
176  void int_accum_shell_point_charge(int ish, int jsh,
177  int ncharge, const double* charge,
178  const double*const* position);
179  void int_shell_nuclear_hf_1der(int ish, int jsh,
180  Ref<GaussianBasisSet> dercs,
181  int centernum);
182  void int_shell_nuclear_nonhf_1der(int ish, int jsh,
183  Ref<GaussianBasisSet> dercs,
184  int centernum);
185  void int_accum_shell_dipole(int ish, int jsh,
186  double *com);
187 
188  // from offsets.cc
189  protected:
190  void int_initialize_offsets1();
191  void int_done_offsets1();
192 
193  // from tformv3.cc
194  protected:
195  double *source;
196  int nsourcemax;
197  // transform implementation functions:
198  void transform_init();
199  void transform_done();
200  void source_space(int nsource);
201  void copy_to_source(double *integrals, int nsource);
202  void do_transform_1e(Integral *integ,
203  double *integrals,
204  GaussianShell *sh1, GaussianShell *sh2,
205  int chunk);
206  void transform_1e(Integral *integ,
207  double *integrals, double *target,
208  GaussianShell *sh1, GaussianShell *sh2, int chunk);
209  void accum_transform_1e(Integral *integ,
210  double *integrals, double *target,
211  GaussianShell *sh1, GaussianShell *sh2, int chunk);
212 
213  // functions for general use outside of tformv3.cc:
214  void transform_1e(Integral*integ,
215  double *integrals, double *target,
216  GaussianShell *sh1, GaussianShell *sh2);
217  void accum_transform_1e(Integral*integ,
218  double *integrals, double *target,
219  GaussianShell *sh1, GaussianShell *sh2);
220  void transform_1e_xyz(Integral*integ,
221  double *integrals, double *target,
222  GaussianShell *sh1, GaussianShell *sh2);
223  void accum_transform_1e_xyz(Integral*integ,
224  double *integrals, double *target,
225  GaussianShell *sh1, GaussianShell *sh2);
226 
227  public:
228  Int1eV3(Integral *,
229  const Ref<GaussianBasisSet>&,
230  const Ref<GaussianBasisSet>&,
231  int order);
232  ~Int1eV3();
233 
234  double *buffer() { return buff; }
235  Ref<GaussianBasisSet> basis() { if (bs1_==bs2_) return bs1_; return 0; }
236  Ref<GaussianBasisSet> basis1() { return bs1_; }
237  Ref<GaussianBasisSet> basis2() { return bs2_; }
238 
239  void kinetic(int ish, int jsh);
240  void nuclear_slow(int ish, int jsh);
241  void nuclear(int ish, int jsh);
242  void overlap(int ish, int jsh);
243  void hcore(int ish, int jsh);
244  void efield(int ish, int jsh, double position[3]);
245  void point_charge(int ish, int jsh,
246  int ncharge, const double* charge,
247  const double*const* position);
248  void dipole(int ish, int jsh,
249  double *com);
250 
251  void hcore_1der(int ish, int jsh,
252  int dercs, int centernum);
253  void kinetic_1der(int ish, int jsh,
254  int dercs, int centernum);
255  void nuclear_1der(int ish, int jsh,
256  int dercs, int centernum);
257  void overlap_1der(int ish, int jsh,
258  int dercs, int centernum);
259 };
260 
261 }
262 
263 #endif
264 
265 // Local Variables:
266 // mode: c++
267 // c-file-style: "CLJ"
268 // End:
sc::Ref< GaussianBasisSet >
sc::IntV3Arraydoublep3
Definition: array.h:79
sc::Int1eV3
Int1eV3 is a class wrapper for the one body part of the C language IntV3 library.
Definition: intv3/int1e.h:47
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::RefCount
The base class for all reference counted objects.
Definition: ref.h:194
sc::GaussianShell
A Gaussian orbital shell.
Definition: gaussshell.h:47

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