1 #include "simint/boys/boys.h"
2 #include "simint/ostei/gen/ostei_generated.h"
3 #include "simint/vectorization/vectorization.h"
4 #include <math.h>
5 #include <string.h>
6 
7 
ostei_d_f_s_s(struct simint_multi_shellpair const P,struct simint_multi_shellpair const Q,double screen_tol,double * const restrict work,double * const restrict INT__d_f_s_s)8 int ostei_d_f_s_s(struct simint_multi_shellpair const P,
9                   struct simint_multi_shellpair const Q,
10                   double screen_tol,
11                   double * const restrict work,
12                   double * const restrict INT__d_f_s_s)
13 {
14 
15     SIMINT_ASSUME_ALIGN_DBL(work);
16     SIMINT_ASSUME_ALIGN_DBL(INT__d_f_s_s);
17     int ab, cd, abcd;
18     int istart, jstart;
19     int iprimcd, nprim_icd, icd;
20     const int check_screen = (screen_tol > 0.0);
21     int i, j;
22     int n;
23     int not_screened;
24     int real_abcd;
25     int iket;
26 
27     // partition workspace
28     double * const INT__s_f_s_s = work + (SIMINT_NSHELL_SIMD * 0);
29     double * const INT__s_g_s_s = work + (SIMINT_NSHELL_SIMD * 10);
30     double * const INT__s_h_s_s = work + (SIMINT_NSHELL_SIMD * 25);
31     SIMINT_DBLTYPE * const primwork = (SIMINT_DBLTYPE *)(work + SIMINT_NSHELL_SIMD*46);
32     SIMINT_DBLTYPE * const restrict PRIM_INT__s_s_s_s = primwork + 0;
33     SIMINT_DBLTYPE * const restrict PRIM_INT__s_p_s_s = primwork + 6;
34     SIMINT_DBLTYPE * const restrict PRIM_INT__s_d_s_s = primwork + 21;
35     SIMINT_DBLTYPE * const restrict PRIM_INT__s_f_s_s = primwork + 45;
36     SIMINT_DBLTYPE * const restrict PRIM_INT__s_g_s_s = primwork + 75;
37     SIMINT_DBLTYPE * const restrict PRIM_INT__s_h_s_s = primwork + 105;
38     double * const hrrwork = (double *)(primwork + 126);
39     double * const HRR_INT__p_f_s_s = hrrwork + 0;
40     double * const HRR_INT__p_g_s_s = hrrwork + 30;
41 
42 
43     // Create constants
44     const SIMINT_DBLTYPE const_1 = SIMINT_DBLSET1(1);
45     const SIMINT_DBLTYPE const_2 = SIMINT_DBLSET1(2);
46     const SIMINT_DBLTYPE const_3 = SIMINT_DBLSET1(3);
47     const SIMINT_DBLTYPE const_4 = SIMINT_DBLSET1(4);
48     const SIMINT_DBLTYPE one_half = SIMINT_DBLSET1(0.5);
49 
50 
51     ////////////////////////////////////////
52     // Loop over shells and primitives
53     ////////////////////////////////////////
54 
55     real_abcd = 0;
56     istart = 0;
57     for(ab = 0; ab < P.nshell12_clip; ++ab)
58     {
59         const int iend = istart + P.nprim12[ab];
60 
61         cd = 0;
62         jstart = 0;
63 
64         for(cd = 0; cd < Q.nshell12_clip; cd += SIMINT_NSHELL_SIMD)
65         {
66             const int nshellbatch = ((cd + SIMINT_NSHELL_SIMD) > Q.nshell12_clip) ? Q.nshell12_clip - cd : SIMINT_NSHELL_SIMD;
67             int jend = jstart;
68             for(i = 0; i < nshellbatch; i++)
69                 jend += Q.nprim12[cd+i];
70 
71             // Clear the beginning of the workspace (where we are accumulating integrals)
72             memset(work, 0, SIMINT_NSHELL_SIMD * 46 * sizeof(double));
73             abcd = 0;
74 
75 
76             for(i = istart; i < iend; ++i)
77             {
78                 SIMINT_DBLTYPE bra_screen_max;  // only used if check_screen
79 
80                 if(check_screen)
81                 {
82                     // Skip this whole thing if always insignificant
83                     if((P.screen[i] * Q.screen_max) < screen_tol)
84                         continue;
85                     bra_screen_max = SIMINT_DBLSET1(P.screen[i]);
86                 }
87 
88                 icd = 0;
89                 iprimcd = 0;
90                 nprim_icd = Q.nprim12[cd];
91                 double * restrict PRIM_PTR_INT__s_f_s_s = INT__s_f_s_s + abcd * 10;
92                 double * restrict PRIM_PTR_INT__s_g_s_s = INT__s_g_s_s + abcd * 15;
93                 double * restrict PRIM_PTR_INT__s_h_s_s = INT__s_h_s_s + abcd * 21;
94 
95 
96 
97                 // Load these one per loop over i
98                 const SIMINT_DBLTYPE P_alpha = SIMINT_DBLSET1(P.alpha[i]);
99                 const SIMINT_DBLTYPE P_prefac = SIMINT_DBLSET1(P.prefac[i]);
100                 const SIMINT_DBLTYPE Pxyz[3] = { SIMINT_DBLSET1(P.x[i]), SIMINT_DBLSET1(P.y[i]), SIMINT_DBLSET1(P.z[i]) };
101 
102                 const SIMINT_DBLTYPE P_PB[3] = { SIMINT_DBLSET1(P.PB_x[i]), SIMINT_DBLSET1(P.PB_y[i]), SIMINT_DBLSET1(P.PB_z[i]) };
103 
104                 for(j = jstart; j < jend; j += SIMINT_SIMD_LEN)
105                 {
106                     // calculate the shell offsets
107                     // these are the offset from the shell pointed to by cd
108                     // for each element
109                     int shelloffsets[SIMINT_SIMD_LEN] = {0};
110                     int lastoffset = 0;
111                     const int nlane = ( ((j + SIMINT_SIMD_LEN) < jend) ? SIMINT_SIMD_LEN : (jend - j));
112 
113                     if((iprimcd + SIMINT_SIMD_LEN) >= nprim_icd)
114                     {
115                         // Handle if the first element of the vector is a new shell
116                         if(iprimcd >= nprim_icd && ((icd+1) < nshellbatch))
117                         {
118                             nprim_icd += Q.nprim12[cd + (++icd)];
119                             PRIM_PTR_INT__s_f_s_s += 10;
120                             PRIM_PTR_INT__s_g_s_s += 15;
121                             PRIM_PTR_INT__s_h_s_s += 21;
122                         }
123                         iprimcd++;
124                         for(n = 1; n < SIMINT_SIMD_LEN; ++n)
125                         {
126                             if(iprimcd >= nprim_icd && ((icd+1) < nshellbatch))
127                             {
128                                 shelloffsets[n] = shelloffsets[n-1] + 1;
129                                 lastoffset++;
130                                 nprim_icd += Q.nprim12[cd + (++icd)];
131                             }
132                             else
133                                 shelloffsets[n] = shelloffsets[n-1];
134                             iprimcd++;
135                         }
136                     }
137                     else
138                         iprimcd += SIMINT_SIMD_LEN;
139 
140                     // Do we have to compute this vector (or has it been screened out)?
141                     // (not_screened != 0 means we have to do this vector)
142                     if(check_screen)
143                     {
144                         const double vmax = vector_max(SIMINT_MUL(bra_screen_max, SIMINT_DBLLOAD(Q.screen, j)));
145                         if(vmax < screen_tol)
146                         {
147                             PRIM_PTR_INT__s_f_s_s += lastoffset*10;
148                             PRIM_PTR_INT__s_g_s_s += lastoffset*15;
149                             PRIM_PTR_INT__s_h_s_s += lastoffset*21;
150                             continue;
151                         }
152                     }
153 
154                     const SIMINT_DBLTYPE Q_alpha = SIMINT_DBLLOAD(Q.alpha, j);
155                     const SIMINT_DBLTYPE PQalpha_mul = SIMINT_MUL(P_alpha, Q_alpha);
156                     const SIMINT_DBLTYPE PQalpha_sum = SIMINT_ADD(P_alpha, Q_alpha);
157                     const SIMINT_DBLTYPE one_over_PQalpha_sum = SIMINT_DIV(const_1, PQalpha_sum);
158 
159 
160                     /* construct R2 = (Px - Qx)**2 + (Py - Qy)**2 + (Pz -Qz)**2 */
161                     SIMINT_DBLTYPE PQ[3];
162                     PQ[0] = SIMINT_SUB(Pxyz[0], SIMINT_DBLLOAD(Q.x, j));
163                     PQ[1] = SIMINT_SUB(Pxyz[1], SIMINT_DBLLOAD(Q.y, j));
164                     PQ[2] = SIMINT_SUB(Pxyz[2], SIMINT_DBLLOAD(Q.z, j));
165                     SIMINT_DBLTYPE R2 = SIMINT_MUL(PQ[0], PQ[0]);
166                     R2 = SIMINT_FMADD(PQ[1], PQ[1], R2);
167                     R2 = SIMINT_FMADD(PQ[2], PQ[2], R2);
168 
169                     const SIMINT_DBLTYPE alpha = SIMINT_MUL(PQalpha_mul, one_over_PQalpha_sum); // alpha from MEST
170                     const SIMINT_DBLTYPE one_over_p = SIMINT_DIV(const_1, P_alpha);
171                     const SIMINT_DBLTYPE one_over_q = SIMINT_DIV(const_1, Q_alpha);
172                     const SIMINT_DBLTYPE one_over_2p = SIMINT_MUL(one_half, one_over_p);
173                     const SIMINT_DBLTYPE one_over_2q = SIMINT_MUL(one_half, one_over_q);
174                     const SIMINT_DBLTYPE one_over_2pq = SIMINT_MUL(one_half, one_over_PQalpha_sum);
175 
176                     // NOTE: Minus sign!
177                     const SIMINT_DBLTYPE a_over_p = SIMINT_MUL(SIMINT_NEG(alpha), one_over_p);
178                     SIMINT_DBLTYPE aop_PQ[3];
179                     aop_PQ[0] = SIMINT_MUL(a_over_p, PQ[0]);
180                     aop_PQ[1] = SIMINT_MUL(a_over_p, PQ[1]);
181                     aop_PQ[2] = SIMINT_MUL(a_over_p, PQ[2]);
182 
183 
184                     //////////////////////////////////////////////
185                     // Fjt function section
186                     // Maximum v value: 5
187                     //////////////////////////////////////////////
188                     // The parameter to the Fjt function
189                     const SIMINT_DBLTYPE F_x = SIMINT_MUL(R2, alpha);
190 
191 
192                     const SIMINT_DBLTYPE Q_prefac = mask_load(nlane, Q.prefac + j);
193 
194 
195                     boys_F_split(PRIM_INT__s_s_s_s, F_x, 5);
196                     SIMINT_DBLTYPE prefac = SIMINT_SQRT(one_over_PQalpha_sum);
197                     prefac = SIMINT_MUL(SIMINT_MUL(P_prefac, Q_prefac), prefac);
198                     for(n = 0; n <= 5; n++)
199                         PRIM_INT__s_s_s_s[n] = SIMINT_MUL(PRIM_INT__s_s_s_s[n], prefac);
200 
201                     //////////////////////////////////////////////
202                     // Primitive integrals: Vertical recurrance
203                     //////////////////////////////////////////////
204 
205                     const SIMINT_DBLTYPE vrr_const_1_over_2p = one_over_2p;
206                     const SIMINT_DBLTYPE vrr_const_2_over_2p = SIMINT_MUL(const_2, one_over_2p);
207                     const SIMINT_DBLTYPE vrr_const_3_over_2p = SIMINT_MUL(const_3, one_over_2p);
208                     const SIMINT_DBLTYPE vrr_const_4_over_2p = SIMINT_MUL(const_4, one_over_2p);
209 
210 
211 
212                     // Forming PRIM_INT__s_p_s_s[5 * 3];
213                     for(n = 0; n < 5; ++n)  // loop over orders of auxiliary function
214                     {
215 
216                         PRIM_INT__s_p_s_s[n * 3 + 0] = SIMINT_MUL(P_PB[0], PRIM_INT__s_s_s_s[n * 1 + 0]);
217                         PRIM_INT__s_p_s_s[n * 3 + 0] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__s_p_s_s[n * 3 + 0]);
218 
219                         PRIM_INT__s_p_s_s[n * 3 + 1] = SIMINT_MUL(P_PB[1], PRIM_INT__s_s_s_s[n * 1 + 0]);
220                         PRIM_INT__s_p_s_s[n * 3 + 1] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__s_p_s_s[n * 3 + 1]);
221 
222                         PRIM_INT__s_p_s_s[n * 3 + 2] = SIMINT_MUL(P_PB[2], PRIM_INT__s_s_s_s[n * 1 + 0]);
223                         PRIM_INT__s_p_s_s[n * 3 + 2] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__s_p_s_s[n * 3 + 2]);
224 
225                     }
226 
227 
228 
229                     // Forming PRIM_INT__s_d_s_s[4 * 6];
230                     for(n = 0; n < 4; ++n)  // loop over orders of auxiliary function
231                     {
232 
233                         PRIM_INT__s_d_s_s[n * 6 + 0] = SIMINT_MUL(P_PB[0], PRIM_INT__s_p_s_s[n * 3 + 0]);
234                         PRIM_INT__s_d_s_s[n * 6 + 0] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__s_p_s_s[(n+1) * 3 + 0], PRIM_INT__s_d_s_s[n * 6 + 0]);
235                         PRIM_INT__s_d_s_s[n * 6 + 0] = SIMINT_FMADD( vrr_const_1_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__s_s_s_s[n * 1 + 0]), PRIM_INT__s_d_s_s[n * 6 + 0]);
236 
237                         PRIM_INT__s_d_s_s[n * 6 + 1] = SIMINT_MUL(P_PB[1], PRIM_INT__s_p_s_s[n * 3 + 0]);
238                         PRIM_INT__s_d_s_s[n * 6 + 1] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__s_p_s_s[(n+1) * 3 + 0], PRIM_INT__s_d_s_s[n * 6 + 1]);
239 
240                         PRIM_INT__s_d_s_s[n * 6 + 3] = SIMINT_MUL(P_PB[1], PRIM_INT__s_p_s_s[n * 3 + 1]);
241                         PRIM_INT__s_d_s_s[n * 6 + 3] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__s_p_s_s[(n+1) * 3 + 1], PRIM_INT__s_d_s_s[n * 6 + 3]);
242                         PRIM_INT__s_d_s_s[n * 6 + 3] = SIMINT_FMADD( vrr_const_1_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__s_s_s_s[n * 1 + 0]), PRIM_INT__s_d_s_s[n * 6 + 3]);
243 
244                         PRIM_INT__s_d_s_s[n * 6 + 5] = SIMINT_MUL(P_PB[2], PRIM_INT__s_p_s_s[n * 3 + 2]);
245                         PRIM_INT__s_d_s_s[n * 6 + 5] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__s_p_s_s[(n+1) * 3 + 2], PRIM_INT__s_d_s_s[n * 6 + 5]);
246                         PRIM_INT__s_d_s_s[n * 6 + 5] = SIMINT_FMADD( vrr_const_1_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__s_s_s_s[(n+1) * 1 + 0], PRIM_INT__s_s_s_s[n * 1 + 0]), PRIM_INT__s_d_s_s[n * 6 + 5]);
247 
248                     }
249 
250 
251 
252                     // Forming PRIM_INT__s_f_s_s[3 * 10];
253                     for(n = 0; n < 3; ++n)  // loop over orders of auxiliary function
254                     {
255 
256                         PRIM_INT__s_f_s_s[n * 10 + 0] = SIMINT_MUL(P_PB[0], PRIM_INT__s_d_s_s[n * 6 + 0]);
257                         PRIM_INT__s_f_s_s[n * 10 + 0] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__s_d_s_s[(n+1) * 6 + 0], PRIM_INT__s_f_s_s[n * 10 + 0]);
258                         PRIM_INT__s_f_s_s[n * 10 + 0] = SIMINT_FMADD( vrr_const_2_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__s_p_s_s[(n+1) * 3 + 0], PRIM_INT__s_p_s_s[n * 3 + 0]), PRIM_INT__s_f_s_s[n * 10 + 0]);
259 
260                         PRIM_INT__s_f_s_s[n * 10 + 1] = SIMINT_MUL(P_PB[1], PRIM_INT__s_d_s_s[n * 6 + 0]);
261                         PRIM_INT__s_f_s_s[n * 10 + 1] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__s_d_s_s[(n+1) * 6 + 0], PRIM_INT__s_f_s_s[n * 10 + 1]);
262 
263                         PRIM_INT__s_f_s_s[n * 10 + 2] = SIMINT_MUL(P_PB[2], PRIM_INT__s_d_s_s[n * 6 + 0]);
264                         PRIM_INT__s_f_s_s[n * 10 + 2] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__s_d_s_s[(n+1) * 6 + 0], PRIM_INT__s_f_s_s[n * 10 + 2]);
265 
266                         PRIM_INT__s_f_s_s[n * 10 + 3] = SIMINT_MUL(P_PB[0], PRIM_INT__s_d_s_s[n * 6 + 3]);
267                         PRIM_INT__s_f_s_s[n * 10 + 3] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__s_d_s_s[(n+1) * 6 + 3], PRIM_INT__s_f_s_s[n * 10 + 3]);
268 
269                         PRIM_INT__s_f_s_s[n * 10 + 4] = SIMINT_MUL(P_PB[2], PRIM_INT__s_d_s_s[n * 6 + 1]);
270                         PRIM_INT__s_f_s_s[n * 10 + 4] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__s_d_s_s[(n+1) * 6 + 1], PRIM_INT__s_f_s_s[n * 10 + 4]);
271 
272                         PRIM_INT__s_f_s_s[n * 10 + 5] = SIMINT_MUL(P_PB[0], PRIM_INT__s_d_s_s[n * 6 + 5]);
273                         PRIM_INT__s_f_s_s[n * 10 + 5] = SIMINT_FMADD( aop_PQ[0], PRIM_INT__s_d_s_s[(n+1) * 6 + 5], PRIM_INT__s_f_s_s[n * 10 + 5]);
274 
275                         PRIM_INT__s_f_s_s[n * 10 + 6] = SIMINT_MUL(P_PB[1], PRIM_INT__s_d_s_s[n * 6 + 3]);
276                         PRIM_INT__s_f_s_s[n * 10 + 6] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__s_d_s_s[(n+1) * 6 + 3], PRIM_INT__s_f_s_s[n * 10 + 6]);
277                         PRIM_INT__s_f_s_s[n * 10 + 6] = SIMINT_FMADD( vrr_const_2_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__s_p_s_s[(n+1) * 3 + 1], PRIM_INT__s_p_s_s[n * 3 + 1]), PRIM_INT__s_f_s_s[n * 10 + 6]);
278 
279                         PRIM_INT__s_f_s_s[n * 10 + 7] = SIMINT_MUL(P_PB[2], PRIM_INT__s_d_s_s[n * 6 + 3]);
280                         PRIM_INT__s_f_s_s[n * 10 + 7] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__s_d_s_s[(n+1) * 6 + 3], PRIM_INT__s_f_s_s[n * 10 + 7]);
281 
282                         PRIM_INT__s_f_s_s[n * 10 + 8] = SIMINT_MUL(P_PB[1], PRIM_INT__s_d_s_s[n * 6 + 5]);
283                         PRIM_INT__s_f_s_s[n * 10 + 8] = SIMINT_FMADD( aop_PQ[1], PRIM_INT__s_d_s_s[(n+1) * 6 + 5], PRIM_INT__s_f_s_s[n * 10 + 8]);
284 
285                         PRIM_INT__s_f_s_s[n * 10 + 9] = SIMINT_MUL(P_PB[2], PRIM_INT__s_d_s_s[n * 6 + 5]);
286                         PRIM_INT__s_f_s_s[n * 10 + 9] = SIMINT_FMADD( aop_PQ[2], PRIM_INT__s_d_s_s[(n+1) * 6 + 5], PRIM_INT__s_f_s_s[n * 10 + 9]);
287                         PRIM_INT__s_f_s_s[n * 10 + 9] = SIMINT_FMADD( vrr_const_2_over_2p, SIMINT_FMADD(a_over_p, PRIM_INT__s_p_s_s[(n+1) * 3 + 2], PRIM_INT__s_p_s_s[n * 3 + 2]), PRIM_INT__s_f_s_s[n * 10 + 9]);
288 
289                     }
290 
291 
292                     VRR_J_s_g_s_s(
293                             PRIM_INT__s_g_s_s,
294                             PRIM_INT__s_f_s_s,
295                             PRIM_INT__s_d_s_s,
296                             P_PB,
297                             a_over_p,
298                             aop_PQ,
299                             one_over_2p,
300                             2);
301 
302 
303                     VRR_J_s_h_s_s(
304                             PRIM_INT__s_h_s_s,
305                             PRIM_INT__s_g_s_s,
306                             PRIM_INT__s_f_s_s,
307                             P_PB,
308                             a_over_p,
309                             aop_PQ,
310                             one_over_2p,
311                             1);
312 
313 
314 
315 
316                     ////////////////////////////////////
317                     // Accumulate contracted integrals
318                     ////////////////////////////////////
319                     if(lastoffset == 0)
320                     {
321                         contract_all(10, PRIM_INT__s_f_s_s, PRIM_PTR_INT__s_f_s_s);
322                         contract_all(15, PRIM_INT__s_g_s_s, PRIM_PTR_INT__s_g_s_s);
323                         contract_all(21, PRIM_INT__s_h_s_s, PRIM_PTR_INT__s_h_s_s);
324                     }
325                     else
326                     {
327                         contract(10, shelloffsets, PRIM_INT__s_f_s_s, PRIM_PTR_INT__s_f_s_s);
328                         contract(15, shelloffsets, PRIM_INT__s_g_s_s, PRIM_PTR_INT__s_g_s_s);
329                         contract(21, shelloffsets, PRIM_INT__s_h_s_s, PRIM_PTR_INT__s_h_s_s);
330                         PRIM_PTR_INT__s_f_s_s += lastoffset*10;
331                         PRIM_PTR_INT__s_g_s_s += lastoffset*15;
332                         PRIM_PTR_INT__s_h_s_s += lastoffset*21;
333                     }
334 
335                 }  // close loop over j
336             }  // close loop over i
337 
338             //Advance to the next batch
339             jstart = SIMINT_SIMD_ROUND(jend);
340 
341             //////////////////////////////////////////////
342             // Contracted integrals: Horizontal recurrance
343             //////////////////////////////////////////////
344 
345 
346             const double hAB[3] = { P.AB_x[ab], P.AB_y[ab], P.AB_z[ab] };
347 
348 
349             for(abcd = 0; abcd < nshellbatch; ++abcd, ++real_abcd)
350             {
351 
352                 // set up HRR pointers
353                 double const * restrict HRR_INT__s_f_s_s = INT__s_f_s_s + abcd * 10;
354                 double const * restrict HRR_INT__s_g_s_s = INT__s_g_s_s + abcd * 15;
355                 double const * restrict HRR_INT__s_h_s_s = INT__s_h_s_s + abcd * 21;
356                 double * restrict HRR_INT__d_f_s_s = INT__d_f_s_s + real_abcd * 60;
357 
358                 // form INT__p_f_s_s
359                 HRR_I_p_f(
360                     HRR_INT__p_f_s_s,
361                     HRR_INT__s_f_s_s,
362                     HRR_INT__s_g_s_s,
363                     hAB, 1);
364 
365                 // form INT__p_g_s_s
366                 HRR_I_p_g(
367                     HRR_INT__p_g_s_s,
368                     HRR_INT__s_g_s_s,
369                     HRR_INT__s_h_s_s,
370                     hAB, 1);
371 
372                 // form INT__d_f_s_s
373                 HRR_I_d_f(
374                     HRR_INT__d_f_s_s,
375                     HRR_INT__p_f_s_s,
376                     HRR_INT__p_g_s_s,
377                     hAB, 1);
378 
379 
380             }  // close HRR loop
381 
382 
383         }   // close loop cdbatch
384 
385         istart = iend;
386     }  // close loop over ab
387 
388     return P.nshell12_clip * Q.nshell12_clip;
389 }
390 
391