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

Generated at Sun Jan 26 2020 23:23:57 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.8.16.