32 Int1eLibint2::AI_OSrecurs_(
double PA[3],
double PB[3],
33 double PC[3],
double gamma,
int iang,
int jang)
42 int ix,iy,iz,jx,jy,jz;
44 double pp = 1/(2*gamma);
45 int mmax = iang+jang + Order;
46 double tmp = sqrt(gamma)*M_2_SQRTPI;
47 double u = gamma*(PC[0]*PC[0] + PC[1]*PC[1] + PC[2]*PC[2]);
48 Fm_Eval_->eval(Fm_table_,u,mmax);
53 AI0_[0][0][m] = tmp * Fm_table_[m];
55 for(m=0;m<=mmax-1;m++) {
56 AIX_[0][0][m] = 2*gamma*PC[0]*AI0_[0][0][m+1];
57 AIY_[0][0][m] = 2*gamma*PC[1]*AI0_[0][0][m+1];
58 AIZ_[0][0][m] = 2*gamma*PC[2]*AI0_[0][0][m+1];
61 for (m = 0; m <= mmax - 2; m++) {
62 AIXX_[0][0][m] = 4 * gamma * gamma * PC[0] * PC[0] * AI0_[0][0][m + 2]
63 - 2 * gamma * AI0_[0][0][m + 1];
64 AIYY_[0][0][m] = 4 * gamma * gamma * PC[1] * PC[1] * AI0_[0][0][m + 2]
65 - 2 * gamma * AI0_[0][0][m + 1];
66 AIZZ_[0][0][m] = 4 * gamma * gamma * PC[2] * PC[2] * AI0_[0][0][m + 2]
67 - 2 * gamma * AI0_[0][0][m + 1];
68 AIXY_[0][0][m] = 4 * gamma * gamma * PC[0] * PC[1] * AI0_[0][0][m + 2];
69 AIXZ_[0][0][m] = 4 * gamma * gamma * PC[0] * PC[2] * AI0_[0][0][m + 2];
70 AIYZ_[0][0][m] = 4 * gamma * gamma * PC[1] * PC[2] * AI0_[0][0][m + 2];
77 for(jy=0;jy<=b-jx;jy++) {
79 jind = jx*jxm+jy*jym+jz*jzm;
81 for(m=0;m<=mmax-b;m++)
82 AI0_[0][jind][m] = PB[2]*AI0_[0][jind-jzm][m] -
83 PC[2]*AI0_[0][jind-jzm][m+1];
85 for(m=0;m<=mmax-b-1;m++) {
86 AIX_[0][jind][m] = PB[2]*AIX_[0][jind-jzm][m] -
87 PC[2]*AIX_[0][jind-jzm][m+1];
88 AIY_[0][jind][m] = PB[2]*AIY_[0][jind-jzm][m] -
89 PC[2]*AIY_[0][jind-jzm][m+1];
90 AIZ_[0][jind][m] = PB[2]*AIZ_[0][jind-jzm][m] -
91 PC[2]*AIZ_[0][jind-jzm][m+1] +
92 AI0_[0][jind-jzm][m+1];
95 for(m=0;m<=mmax-b-2;m++) {
96 AIXX_[0][jind][m] = PB[2]*AIXX_[0][jind-jzm][m] -
97 PC[2]*AIXX_[0][jind-jzm][m+1];
98 AIYY_[0][jind][m] = PB[2]*AIYY_[0][jind-jzm][m] -
99 PC[2]*AIYY_[0][jind-jzm][m+1];
100 AIZZ_[0][jind][m] = PB[2]*AIZZ_[0][jind-jzm][m] -
101 PC[2]*AIZZ_[0][jind-jzm][m+1] +
102 2*AIZ_[0][jind-jzm][m+1];
103 AIXY_[0][jind][m] = PB[2]*AIXY_[0][jind-jzm][m] -
104 PC[2]*AIXY_[0][jind-jzm][m+1];
105 AIXZ_[0][jind][m] = PB[2]*AIXZ_[0][jind-jzm][m] -
106 PC[2]*AIXZ_[0][jind-jzm][m+1] +
107 AIX_[0][jind-jzm][m+1];
108 AIYZ_[0][jind][m] = PB[2]*AIYZ_[0][jind-jzm][m] -
109 PC[2]*AIYZ_[0][jind-jzm][m+1] +
110 AIY_[0][jind-jzm][m+1];
113 for(m=0;m<=mmax-b;m++)
114 AI0_[0][jind][m] += pp*(jz-1)*(AI0_[0][jind-2*jzm][m] -
115 AI0_[0][jind-2*jzm][m+1]);
117 for(m=0;m<=mmax-b-1;m++) {
118 AIX_[0][jind][m] += pp*(jz-1)*(AIX_[0][jind-2*jzm][m] -
119 AIX_[0][jind-2*jzm][m+1]);
120 AIY_[0][jind][m] += pp*(jz-1)*(AIY_[0][jind-2*jzm][m] -
121 AIY_[0][jind-2*jzm][m+1]);
122 AIZ_[0][jind][m] += pp*(jz-1)*(AIZ_[0][jind-2*jzm][m] -
123 AIZ_[0][jind-2*jzm][m+1]);
126 for(m=0;m<=mmax-b-2;m++) {
127 AIXX_[0][jind][m] += pp*(jz-1)*(AIXX_[0][jind-2*jzm][m] -
128 AIXX_[0][jind-2*jzm][m+1]);
129 AIYY_[0][jind][m] += pp*(jz-1)*(AIYY_[0][jind-2*jzm][m] -
130 AIYY_[0][jind-2*jzm][m+1]);
131 AIZZ_[0][jind][m] += pp*(jz-1)*(AIZZ_[0][jind-2*jzm][m] -
132 AIZZ_[0][jind-2*jzm][m+1]);
133 AIXY_[0][jind][m] += pp*(jz-1)*(AIXY_[0][jind-2*jzm][m] -
134 AIXY_[0][jind-2*jzm][m+1]);
135 AIXZ_[0][jind][m] += pp*(jz-1)*(AIXZ_[0][jind-2*jzm][m] -
136 AIXZ_[0][jind-2*jzm][m+1]);
137 AIYZ_[0][jind][m] += pp*(jz-1)*(AIYZ_[0][jind-2*jzm][m] -
138 AIYZ_[0][jind-2*jzm][m+1]);
144 for(m=0;m<=mmax-b;m++)
145 AI0_[0][jind][m] = PB[1]*AI0_[0][jind-jym][m] -
146 PC[1]*AI0_[0][jind-jym][m+1];
148 for(m=0;m<=mmax-b-1;m++) {
149 AIX_[0][jind][m] = PB[1]*AIX_[0][jind-jym][m] -
150 PC[1]*AIX_[0][jind-jym][m+1];
151 AIY_[0][jind][m] = PB[1]*AIY_[0][jind-jym][m] -
152 PC[1]*AIY_[0][jind-jym][m+1] +
153 AI0_[0][jind-jym][m+1];
154 AIZ_[0][jind][m] = PB[1]*AIZ_[0][jind-jym][m] -
155 PC[1]*AIZ_[0][jind-jym][m+1];
158 for(m=0;m<=mmax-b-2;m++) {
159 AIXX_[0][jind][m] = PB[1]*AIXX_[0][jind-jym][m] -
160 PC[1]*AIXX_[0][jind-jym][m+1];
161 AIYY_[0][jind][m] = PB[1]*AIYY_[0][jind-jym][m] -
162 PC[1]*AIYY_[0][jind-jym][m+1] +
163 2*AIY_[0][jind-jym][m+1];
164 AIZZ_[0][jind][m] = PB[1]*AIZZ_[0][jind-jym][m] -
165 PC[1]*AIZZ_[0][jind-jym][m+1];
166 AIXY_[0][jind][m] = PB[1]*AIXY_[0][jind-jym][m] -
167 PC[1]*AIXY_[0][jind-jym][m+1] +
168 AIX_[0][jind-jym][m+1];
169 AIXZ_[0][jind][m] = PB[1]*AIXZ_[0][jind-jym][m] -
170 PC[1]*AIXZ_[0][jind-jym][m+1];
171 AIYZ_[0][jind][m] = PB[1]*AIYZ_[0][jind-jym][m] -
172 PC[1]*AIYZ_[0][jind-jym][m+1] +
173 AIZ_[0][jind-jym][m+1];
176 for(m=0;m<=mmax-b;m++)
177 AI0_[0][jind][m] += pp*(jy-1)*(AI0_[0][jind-2*jym][m] -
178 AI0_[0][jind-2*jym][m+1]);
180 for(m=0;m<=mmax-b-1;m++) {
181 AIX_[0][jind][m] += pp*(jy-1)*(AIX_[0][jind-2*jym][m] -
182 AIX_[0][jind-2*jym][m+1]);
183 AIY_[0][jind][m] += pp*(jy-1)*(AIY_[0][jind-2*jym][m] -
184 AIY_[0][jind-2*jym][m+1]);
185 AIZ_[0][jind][m] += pp*(jy-1)*(AIZ_[0][jind-2*jym][m] -
186 AIZ_[0][jind-2*jym][m+1]);
189 for(m=0;m<=mmax-b-2;m++) {
190 AIXX_[0][jind][m] += pp*(jy-1)*(AIXX_[0][jind-2*jym][m] -
191 AIXX_[0][jind-2*jym][m+1]);
192 AIYY_[0][jind][m] += pp*(jy-1)*(AIYY_[0][jind-2*jym][m] -
193 AIYY_[0][jind-2*jym][m+1]);
194 AIZZ_[0][jind][m] += pp*(jy-1)*(AIZZ_[0][jind-2*jym][m] -
195 AIZZ_[0][jind-2*jym][m+1]);
196 AIXY_[0][jind][m] += pp*(jy-1)*(AIXY_[0][jind-2*jym][m] -
197 AIXY_[0][jind-2*jym][m+1]);
198 AIXZ_[0][jind][m] += pp*(jy-1)*(AIXZ_[0][jind-2*jym][m] -
199 AIXZ_[0][jind-2*jym][m+1]);
200 AIYZ_[0][jind][m] += pp*(jy-1)*(AIYZ_[0][jind-2*jym][m] -
201 AIYZ_[0][jind-2*jym][m+1]);
207 for(m=0;m<=mmax-b;m++)
208 AI0_[0][jind][m] = PB[0]*AI0_[0][jind-jxm][m] -
209 PC[0]*AI0_[0][jind-jxm][m+1];
211 for(m=0;m<=mmax-b-1;m++) {
212 AIX_[0][jind][m] = PB[0]*AIX_[0][jind-jxm][m] -
213 PC[0]*AIX_[0][jind-jxm][m+1] +
214 AI0_[0][jind-jxm][m+1];
215 AIY_[0][jind][m] = PB[0]*AIY_[0][jind-jxm][m] -
216 PC[0]*AIY_[0][jind-jxm][m+1];
217 AIZ_[0][jind][m] = PB[0]*AIZ_[0][jind-jxm][m] -
218 PC[0]*AIZ_[0][jind-jxm][m+1];
221 for(m=0;m<=mmax-b-2;m++) {
222 AIXX_[0][jind][m] = PB[0]*AIXX_[0][jind-jxm][m] -
223 PC[0]*AIXX_[0][jind-jxm][m+1] +
224 2*AIX_[0][jind-jxm][m+1];
225 AIYY_[0][jind][m] = PB[0]*AIYY_[0][jind-jxm][m] -
226 PC[0]*AIYY_[0][jind-jxm][m+1];
227 AIZZ_[0][jind][m] = PB[0]*AIZZ_[0][jind-jxm][m] -
228 PC[0]*AIZZ_[0][jind-jxm][m+1];
229 AIXY_[0][jind][m] = PB[0]*AIXY_[0][jind-jxm][m] -
230 PC[0]*AIXY_[0][jind-jxm][m+1] +
231 AIY_[0][jind-jxm][m+1];
232 AIXZ_[0][jind][m] = PB[0]*AIXZ_[0][jind-jxm][m] -
233 PC[0]*AIXZ_[0][jind-jxm][m+1] +
234 AIZ_[0][jind-jxm][m+1];
235 AIYZ_[0][jind][m] = PB[0]*AIYZ_[0][jind-jxm][m] -
236 PC[0]*AIYZ_[0][jind-jxm][m+1];
239 for(m=0;m<=mmax-b;m++)
240 AI0_[0][jind][m] += pp*(jx-1)*(AI0_[0][jind-2*jxm][m] -
241 AI0_[0][jind-2*jxm][m+1]);
243 for(m=0;m<=mmax-b-1;m++) {
244 AIX_[0][jind][m] += pp*(jx-1)*(AIX_[0][jind-2*jxm][m] -
245 AIX_[0][jind-2*jxm][m+1]);
246 AIY_[0][jind][m] += pp*(jx-1)*(AIY_[0][jind-2*jxm][m] -
247 AIY_[0][jind-2*jxm][m+1]);
248 AIZ_[0][jind][m] += pp*(jx-1)*(AIZ_[0][jind-2*jxm][m] -
249 AIZ_[0][jind-2*jxm][m+1]);
252 for(m=0;m<=mmax-b-2;m++) {
253 AIXX_[0][jind][m] += pp*(jx-1)*(AIXX_[0][jind-2*jxm][m] -
254 AIXX_[0][jind-2*jxm][m+1]);
255 AIYY_[0][jind][m] += pp*(jx-1)*(AIYY_[0][jind-2*jxm][m] -
256 AIYY_[0][jind-2*jxm][m+1]);
257 AIZZ_[0][jind][m] += pp*(jx-1)*(AIZZ_[0][jind-2*jxm][m] -
258 AIZZ_[0][jind-2*jxm][m+1]);
259 AIXY_[0][jind][m] += pp*(jx-1)*(AIXY_[0][jind-2*jxm][m] -
260 AIXY_[0][jind-2*jxm][m+1]);
261 AIXZ_[0][jind][m] += pp*(jx-1)*(AIXZ_[0][jind-2*jxm][m] -
262 AIXZ_[0][jind-2*jxm][m+1]);
263 AIYZ_[0][jind][m] += pp*(jx-1)*(AIYZ_[0][jind-2*jxm][m] -
264 AIYZ_[0][jind-2*jxm][m+1]);
269 throw ProgrammingError(
"Logic error in Coulomb 1-e OS RR code",__FILE__,__LINE__);
279 for(jy=0;jy<=b-jx;jy++) {
281 jind = jx*jxm + jy*jym + jz*jzm;
284 for(iy=0;iy<=a-ix;iy++) {
286 iind = ix*ixm + iy*iym + iz*izm;
288 for(m=0;m<=mmax-a-b;m++)
289 AI0_[iind][jind][m] = PA[2]*AI0_[iind-izm][jind][m] -
290 PC[2]*AI0_[iind-izm][jind][m+1];
292 for(m=0;m<=mmax-a-b-1;m++) {
293 AIX_[iind][jind][m] = PA[2]*AIX_[iind-izm][jind][m] -
294 PC[2]*AIX_[iind-izm][jind][m+1];
295 AIY_[iind][jind][m] = PA[2]*AIY_[iind-izm][jind][m] -
296 PC[2]*AIY_[iind-izm][jind][m+1];
297 AIZ_[iind][jind][m] = PA[2]*AIZ_[iind-izm][jind][m] -
298 PC[2]*AIZ_[iind-izm][jind][m+1] +
299 AI0_[iind-izm][jind][m+1];
302 for(m=0;m<=mmax-a-b-2;m++) {
303 AIXX_[iind][jind][m] = PA[2]*AIXX_[iind-izm][jind][m] -
304 PC[2]*AIXX_[iind-izm][jind][m+1];
305 AIYY_[iind][jind][m] = PA[2]*AIYY_[iind-izm][jind][m] -
306 PC[2]*AIYY_[iind-izm][jind][m+1];
307 AIZZ_[iind][jind][m] = PA[2]*AIZZ_[iind-izm][jind][m] -
308 PC[2]*AIZZ_[iind-izm][jind][m+1] +
309 2*AIZ_[iind-izm][jind][m+1];
310 AIXY_[iind][jind][m] = PA[2]*AIXY_[iind-izm][jind][m] -
311 PC[2]*AIXY_[iind-izm][jind][m+1];
312 AIXZ_[iind][jind][m] = PA[2]*AIXZ_[iind-izm][jind][m] -
313 PC[2]*AIXZ_[iind-izm][jind][m+1] +
314 AIX_[iind-izm][jind][m+1];
315 AIYZ_[iind][jind][m] = PA[2]*AIYZ_[iind-izm][jind][m] -
316 PC[2]*AIYZ_[iind-izm][jind][m+1] +
317 AIY_[iind-izm][jind][m+1];
320 for(m=0;m<=mmax-a-b;m++)
321 AI0_[iind][jind][m] += pp*(iz-1)*
322 (AI0_[iind-2*izm][jind][m] - AI0_[iind-2*izm][jind][m+1]);
324 for(m=0;m<=mmax-a-b-1;m++) {
325 AIX_[iind][jind][m] += pp*(iz-1)*(AIX_[iind-2*izm][jind][m] -
326 AIX_[iind-2*izm][jind][m+1]);
327 AIY_[iind][jind][m] += pp*(iz-1)*(AIY_[iind-2*izm][jind][m] -
328 AIY_[iind-2*izm][jind][m+1]);
329 AIZ_[iind][jind][m] += pp*(iz-1)*(AIZ_[iind-2*izm][jind][m] -
330 AIZ_[iind-2*izm][jind][m+1]);
333 for(m=0;m<=mmax-a-b-2;m++) {
334 AIXX_[iind][jind][m] += pp*(iz-1)*(AIXX_[iind-2*izm][jind][m] -
335 AIXX_[iind-2*izm][jind][m+1]);
336 AIYY_[iind][jind][m] += pp*(iz-1)*(AIYY_[iind-2*izm][jind][m] -
337 AIYY_[iind-2*izm][jind][m+1]);
338 AIZZ_[iind][jind][m] += pp*(iz-1)*(AIZZ_[iind-2*izm][jind][m] -
339 AIZZ_[iind-2*izm][jind][m+1]);
340 AIXY_[iind][jind][m] += pp*(iz-1)*(AIXY_[iind-2*izm][jind][m] -
341 AIXY_[iind-2*izm][jind][m+1]);
342 AIXZ_[iind][jind][m] += pp*(iz-1)*(AIXZ_[iind-2*izm][jind][m] -
343 AIXZ_[iind-2*izm][jind][m+1]);
344 AIYZ_[iind][jind][m] += pp*(iz-1)*(AIYZ_[iind-2*izm][jind][m] -
345 AIYZ_[iind-2*izm][jind][m+1]);
349 for(m=0;m<=mmax-a-b;m++)
350 AI0_[iind][jind][m] += pp*jz*
351 (AI0_[iind-izm][jind-jzm][m] - AI0_[iind-izm][jind-jzm][m+1]);
353 for(m=0;m<=mmax-a-b-1;m++) {
354 AIX_[iind][jind][m] += pp*jz*(AIX_[iind-izm][jind-jzm][m] -
355 AIX_[iind-izm][jind-jzm][m+1]);
356 AIY_[iind][jind][m] += pp*jz*(AIY_[iind-izm][jind-jzm][m] -
357 AIY_[iind-izm][jind-jzm][m+1]);
358 AIZ_[iind][jind][m] += pp*jz*(AIZ_[iind-izm][jind-jzm][m] -
359 AIZ_[iind-izm][jind-jzm][m+1]);
362 for(m=0;m<=mmax-a-b-2;m++) {
363 AIXX_[iind][jind][m] += pp*jz*(AIXX_[iind-izm][jind-jzm][m] -
364 AIXX_[iind-izm][jind-jzm][m+1]);
365 AIYY_[iind][jind][m] += pp*jz*(AIYY_[iind-izm][jind-jzm][m] -
366 AIYY_[iind-izm][jind-jzm][m+1]);
367 AIZZ_[iind][jind][m] += pp*jz*(AIZZ_[iind-izm][jind-jzm][m] -
368 AIZZ_[iind-izm][jind-jzm][m+1]);
369 AIXY_[iind][jind][m] += pp*jz*(AIXY_[iind-izm][jind-jzm][m] -
370 AIXY_[iind-izm][jind-jzm][m+1]);
371 AIXZ_[iind][jind][m] += pp*jz*(AIXZ_[iind-izm][jind-jzm][m] -
372 AIXZ_[iind-izm][jind-jzm][m+1]);
373 AIYZ_[iind][jind][m] += pp*jz*(AIYZ_[iind-izm][jind-jzm][m] -
374 AIYZ_[iind-izm][jind-jzm][m+1]);
380 for(m=0;m<=mmax-a-b;m++)
381 AI0_[iind][jind][m] = PA[1]*AI0_[iind-iym][jind][m] -
382 PC[1]*AI0_[iind-iym][jind][m+1];
384 for(m=0;m<=mmax-a-b-1;m++) {
385 AIX_[iind][jind][m] = PA[1]*AIX_[iind-iym][jind][m] -
386 PC[1]*AIX_[iind-iym][jind][m+1];
387 AIY_[iind][jind][m] = PA[1]*AIY_[iind-iym][jind][m] -
388 PC[1]*AIY_[iind-iym][jind][m+1] +
389 AI0_[iind-iym][jind][m+1];
390 AIZ_[iind][jind][m] = PA[1]*AIZ_[iind-iym][jind][m] -
391 PC[1]*AIZ_[iind-iym][jind][m+1];
394 for(m=0;m<=mmax-a-b-2;m++) {
395 AIXX_[iind][jind][m] = PA[1]*AIXX_[iind-iym][jind][m] -
396 PC[1]*AIXX_[iind-iym][jind][m+1];
397 AIYY_[iind][jind][m] = PA[1]*AIYY_[iind-iym][jind][m] -
398 PC[1]*AIYY_[iind-iym][jind][m+1] +
399 2*AIY_[iind-iym][jind][m+1];
400 AIZZ_[iind][jind][m] = PA[1]*AIZZ_[iind-iym][jind][m] -
401 PC[1]*AIZZ_[iind-iym][jind][m+1];
402 AIXY_[iind][jind][m] = PA[1]*AIXY_[iind-iym][jind][m] -
403 PC[1]*AIXY_[iind-iym][jind][m+1] +
404 AIX_[iind-iym][jind][m+1];
405 AIXZ_[iind][jind][m] = PA[1]*AIXZ_[iind-iym][jind][m] -
406 PC[1]*AIXZ_[iind-iym][jind][m+1];
407 AIYZ_[iind][jind][m] = PA[1]*AIYZ_[iind-iym][jind][m] -
408 PC[1]*AIYZ_[iind-iym][jind][m+1] +
409 AIZ_[iind-iym][jind][m+1];
412 for(m=0;m<=mmax-a-b;m++)
413 AI0_[iind][jind][m] += pp*(iy-1)*
414 (AI0_[iind-2*iym][jind][m] - AI0_[iind-2*iym][jind][m+1]);
416 for(m=0;m<=mmax-a-b-1;m++) {
417 AIX_[iind][jind][m] += pp*(iy-1)*(AIX_[iind-2*iym][jind][m] -
418 AIX_[iind-2*iym][jind][m+1]);
419 AIY_[iind][jind][m] += pp*(iy-1)*(AIY_[iind-2*iym][jind][m] -
420 AIY_[iind-2*iym][jind][m+1]);
421 AIZ_[iind][jind][m] += pp*(iy-1)*(AIZ_[iind-2*iym][jind][m] -
422 AIZ_[iind-2*iym][jind][m+1]);
425 for(m=0;m<=mmax-a-b-2;m++) {
426 AIXX_[iind][jind][m] += pp*(iy-1)*(AIXX_[iind-2*iym][jind][m] -
427 AIXX_[iind-2*iym][jind][m+1]);
428 AIYY_[iind][jind][m] += pp*(iy-1)*(AIYY_[iind-2*iym][jind][m] -
429 AIYY_[iind-2*iym][jind][m+1]);
430 AIZZ_[iind][jind][m] += pp*(iy-1)*(AIZZ_[iind-2*iym][jind][m] -
431 AIZZ_[iind-2*iym][jind][m+1]);
432 AIXY_[iind][jind][m] += pp*(iy-1)*(AIXY_[iind-2*iym][jind][m] -
433 AIXY_[iind-2*iym][jind][m+1]);
434 AIXZ_[iind][jind][m] += pp*(iy-1)*(AIXZ_[iind-2*iym][jind][m] -
435 AIXZ_[iind-2*iym][jind][m+1]);
436 AIYZ_[iind][jind][m] += pp*(iy-1)*(AIYZ_[iind-2*iym][jind][m] -
437 AIYZ_[iind-2*iym][jind][m+1]);
441 for(m=0;m<=mmax-a-b;m++)
442 AI0_[iind][jind][m] += pp*jy*
443 (AI0_[iind-iym][jind-jym][m] - AI0_[iind-iym][jind-jym][m+1]);
445 for(m=0;m<=mmax-a-b-1;m++) {
446 AIX_[iind][jind][m] += pp*jy*(AIX_[iind-iym][jind-jym][m] -
447 AIX_[iind-iym][jind-jym][m+1]);
448 AIY_[iind][jind][m] += pp*jy*(AIY_[iind-iym][jind-jym][m] -
449 AIY_[iind-iym][jind-jym][m+1]);
450 AIZ_[iind][jind][m] += pp*jy*(AIZ_[iind-iym][jind-jym][m] -
451 AIZ_[iind-iym][jind-jym][m+1]);
454 for(m=0;m<=mmax-a-b-2;m++) {
455 AIXX_[iind][jind][m] += pp*jy*(AIXX_[iind-iym][jind-jym][m] -
456 AIXX_[iind-iym][jind-jym][m+1]);
457 AIYY_[iind][jind][m] += pp*jy*(AIYY_[iind-iym][jind-jym][m] -
458 AIYY_[iind-iym][jind-jym][m+1]);
459 AIZZ_[iind][jind][m] += pp*jy*(AIZZ_[iind-iym][jind-jym][m] -
460 AIZZ_[iind-iym][jind-jym][m+1]);
461 AIXY_[iind][jind][m] += pp*jy*(AIXY_[iind-iym][jind-jym][m] -
462 AIXY_[iind-iym][jind-jym][m+1]);
463 AIXZ_[iind][jind][m] += pp*jy*(AIXZ_[iind-iym][jind-jym][m] -
464 AIXZ_[iind-iym][jind-jym][m+1]);
465 AIYZ_[iind][jind][m] += pp*jy*(AIYZ_[iind-iym][jind-jym][m] -
466 AIYZ_[iind-iym][jind-jym][m+1]);
472 for(m=0;m<=mmax-a-b;m++)
473 AI0_[iind][jind][m] = PA[0]*AI0_[iind-ixm][jind][m] -
474 PC[0]*AI0_[iind-ixm][jind][m+1];
476 for(m=0;m<=mmax-a-b-1;m++) {
477 AIX_[iind][jind][m] = PA[0]*AIX_[iind-ixm][jind][m] -
478 PC[0]*AIX_[iind-ixm][jind][m+1] +
479 AI0_[iind-ixm][jind][m+1];
480 AIY_[iind][jind][m] = PA[0]*AIY_[iind-ixm][jind][m] -
481 PC[0]*AIY_[iind-ixm][jind][m+1];
482 AIZ_[iind][jind][m] = PA[0]*AIZ_[iind-ixm][jind][m] -
483 PC[0]*AIZ_[iind-ixm][jind][m+1];
486 for(m=0;m<=mmax-a-b-2;m++) {
487 AIXX_[iind][jind][m] = PA[0]*AIXX_[iind-ixm][jind][m] -
488 PC[0]*AIXX_[iind-ixm][jind][m+1] +
489 2*AIX_[iind-ixm][jind][m+1];
490 AIYY_[iind][jind][m] = PA[0]*AIYY_[iind-ixm][jind][m] -
491 PC[0]*AIYY_[iind-ixm][jind][m+1];
492 AIZZ_[iind][jind][m] = PA[0]*AIZZ_[iind-ixm][jind][m] -
493 PC[0]*AIZZ_[iind-ixm][jind][m+1];
494 AIXY_[iind][jind][m] = PA[0]*AIXY_[iind-ixm][jind][m] -
495 PC[0]*AIXY_[iind-ixm][jind][m+1] +
496 AIY_[iind-ixm][jind][m+1];
497 AIXZ_[iind][jind][m] = PA[0]*AIXZ_[iind-ixm][jind][m] -
498 PC[0]*AIXZ_[iind-ixm][jind][m+1] +
499 AIZ_[iind-ixm][jind][m+1];
500 AIYZ_[iind][jind][m] = PA[0]*AIYZ_[iind-ixm][jind][m] -
501 PC[0]*AIYZ_[iind-ixm][jind][m+1];
504 for(m=0;m<=mmax-a-b;m++)
505 AI0_[iind][jind][m] += pp*(ix-1)*
506 (AI0_[iind-2*ixm][jind][m] - AI0_[iind-2*ixm][jind][m+1]);
508 for(m=0;m<=mmax-a-b-1;m++) {
509 AIX_[iind][jind][m] += pp*(ix-1)*(AIX_[iind-2*ixm][jind][m] -
510 AIX_[iind-2*ixm][jind][m+1]);
511 AIY_[iind][jind][m] += pp*(ix-1)*(AIY_[iind-2*ixm][jind][m] -
512 AIY_[iind-2*ixm][jind][m+1]);
513 AIZ_[iind][jind][m] += pp*(ix-1)*(AIZ_[iind-2*ixm][jind][m] -
514 AIZ_[iind-2*ixm][jind][m+1]);
517 for(m=0;m<=mmax-a-b-2;m++) {
518 AIXX_[iind][jind][m] += pp*(ix-1)*(AIXX_[iind-2*ixm][jind][m] -
519 AIXX_[iind-2*ixm][jind][m+1]);
520 AIYY_[iind][jind][m] += pp*(ix-1)*(AIYY_[iind-2*ixm][jind][m] -
521 AIYY_[iind-2*ixm][jind][m+1]);
522 AIZZ_[iind][jind][m] += pp*(ix-1)*(AIZZ_[iind-2*ixm][jind][m] -
523 AIZZ_[iind-2*ixm][jind][m+1]);
524 AIXY_[iind][jind][m] += pp*(ix-1)*(AIXY_[iind-2*ixm][jind][m] -
525 AIXY_[iind-2*ixm][jind][m+1]);
526 AIXZ_[iind][jind][m] += pp*(ix-1)*(AIXZ_[iind-2*ixm][jind][m] -
527 AIXZ_[iind-2*ixm][jind][m+1]);
528 AIYZ_[iind][jind][m] += pp*(ix-1)*(AIYZ_[iind-2*ixm][jind][m] -
529 AIYZ_[iind-2*ixm][jind][m+1]);
533 for(m=0;m<=mmax-a-b;m++)
534 AI0_[iind][jind][m] += pp*jx*
535 (AI0_[iind-ixm][jind-jxm][m] - AI0_[iind-ixm][jind-jxm][m+1]);
537 for(m=0;m<=mmax-a-b-1;m++) {
538 AIX_[iind][jind][m] += pp*jx*(AIX_[iind-ixm][jind-jxm][m] -
539 AIX_[iind-ixm][jind-jxm][m+1]);
540 AIY_[iind][jind][m] += pp*jx*(AIY_[iind-ixm][jind-jxm][m] -
541 AIY_[iind-ixm][jind-jxm][m+1]);
542 AIZ_[iind][jind][m] += pp*jx*(AIZ_[iind-ixm][jind-jxm][m] -
543 AIZ_[iind-ixm][jind-jxm][m+1]);
546 for(m=0;m<=mmax-a-b-2;m++) {
547 AIXX_[iind][jind][m] += pp*jx*(AIXX_[iind-ixm][jind-jxm][m] -
548 AIXX_[iind-ixm][jind-jxm][m+1]);
549 AIYY_[iind][jind][m] += pp*jx*(AIYY_[iind-ixm][jind-jxm][m] -
550 AIYY_[iind-ixm][jind-jxm][m+1]);
551 AIZZ_[iind][jind][m] += pp*jx*(AIZZ_[iind-ixm][jind-jxm][m] -
552 AIZZ_[iind-ixm][jind-jxm][m+1]);
553 AIXY_[iind][jind][m] += pp*jx*(AIXY_[iind-ixm][jind-jxm][m] -
554 AIXY_[iind-ixm][jind-jxm][m+1]);
555 AIXZ_[iind][jind][m] += pp*jx*(AIXZ_[iind-ixm][jind-jxm][m] -
556 AIXZ_[iind-ixm][jind-jxm][m+1]);
557 AIYZ_[iind][jind][m] += pp*jx*(AIYZ_[iind-ixm][jind-jxm][m] -
558 AIYZ_[iind-ixm][jind-jxm][m+1]);
563 throw ProgrammingError(
"Logic error in Coulomb 1-e OS RR code",__FILE__,__LINE__);