MPQC 3.0.0-alpha
Loading...
Searching...
No Matches
libint2_utils.h
1//
2// libint2_utils.h
3//
4// Copyright (C) 2001 Edward Valeev
5//
6// Author: Edward Valeev <evaleev@vt.edu>
7// Maintainer: EV
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_libint2_libint2utils_h
29#define _chemistry_qc_libint2_libint2utils_h
30
31namespace {
32 typedef Libint_t prim_data;
33 inline void assign_FjT(prim_data* Data, const int& jmax, const double* FjT, const double& scale) {
34 switch (jmax) {
35#if LIBINT2_DEFINED(eri,LIBINT_T_SS_EREP_SS(28))
36 case 28:
37 Data->LIBINT_T_SS_EREP_SS(28)[0] = FjT[28] * scale;
38#endif
39#if LIBINT2_DEFINED(eri,LIBINT_T_SS_EREP_SS(27))
40 case 27:
41 Data->LIBINT_T_SS_EREP_SS(27)[0] = FjT[27] * scale;
42#endif
43#if LIBINT2_DEFINED(eri,LIBINT_T_SS_EREP_SS(26))
44 case 26:
45 Data->LIBINT_T_SS_EREP_SS(26)[0] = FjT[26] * scale;
46#endif
47#if LIBINT2_DEFINED(eri,LIBINT_T_SS_EREP_SS(25))
48 case 25:
49 Data->LIBINT_T_SS_EREP_SS(25)[0] = FjT[25] * scale;
50#endif
51#if LIBINT2_DEFINED(eri,LIBINT_T_SS_EREP_SS(24))
52 case 24:
53 Data->LIBINT_T_SS_EREP_SS(24)[0] = FjT[24] * scale;
54#endif
55#if LIBINT2_DEFINED(eri,LIBINT_T_SS_EREP_SS(23))
56 case 23:
57 Data->LIBINT_T_SS_EREP_SS(23)[0] = FjT[23] * scale;
58#endif
59#if LIBINT2_DEFINED(eri,LIBINT_T_SS_EREP_SS(22))
60 case 22:
61 Data->LIBINT_T_SS_EREP_SS(22)[0] = FjT[22] * scale;
62#endif
63#if LIBINT2_DEFINED(eri,LIBINT_T_SS_EREP_SS(21))
64 case 21:
65 Data->LIBINT_T_SS_EREP_SS(21)[0] = FjT[21] * scale;
66#endif
67#if LIBINT2_DEFINED(eri,LIBINT_T_SS_EREP_SS(20))
68 case 20:
69 Data->LIBINT_T_SS_EREP_SS(20)[0] = FjT[20] * scale;
70#endif
71#if LIBINT2_DEFINED(eri,LIBINT_T_SS_EREP_SS(19))
72 case 19:
73 Data->LIBINT_T_SS_EREP_SS(19)[0] = FjT[19] * scale;
74#endif
75#if LIBINT2_DEFINED(eri,LIBINT_T_SS_EREP_SS(18))
76 case 18:
77 Data->LIBINT_T_SS_EREP_SS(18)[0] = FjT[18] * scale;
78#endif
79#if LIBINT2_DEFINED(eri,LIBINT_T_SS_EREP_SS(17))
80 case 17:
81 Data->LIBINT_T_SS_EREP_SS(17)[0] = FjT[17] * scale;
82#endif
83#if LIBINT2_DEFINED(eri,LIBINT_T_SS_EREP_SS(16))
84 case 16:
85 Data->LIBINT_T_SS_EREP_SS(16)[0] = FjT[16] * scale;
86#endif
87#if LIBINT2_DEFINED(eri,LIBINT_T_SS_EREP_SS(15))
88 case 15:
89 Data->LIBINT_T_SS_EREP_SS(15)[0] = FjT[15] * scale;
90#endif
91#if LIBINT2_DEFINED(eri,LIBINT_T_SS_EREP_SS(14))
92 case 14:
93 Data->LIBINT_T_SS_EREP_SS(14)[0] = FjT[14] * scale;
94#endif
95#if LIBINT2_DEFINED(eri,LIBINT_T_SS_EREP_SS(13))
96 case 13:
97 Data->LIBINT_T_SS_EREP_SS(13)[0] = FjT[13] * scale;
98#endif
99#if LIBINT2_DEFINED(eri,LIBINT_T_SS_EREP_SS(12))
100 case 12:
101 Data->LIBINT_T_SS_EREP_SS(12)[0] = FjT[12] * scale;
102#endif
103#if LIBINT2_DEFINED(eri,LIBINT_T_SS_EREP_SS(11))
104 case 11:
105 Data->LIBINT_T_SS_EREP_SS(11)[0] = FjT[11] * scale;
106#endif
107#if LIBINT2_DEFINED(eri,LIBINT_T_SS_EREP_SS(10))
108 case 10:
109 Data->LIBINT_T_SS_EREP_SS(10)[0] = FjT[10] * scale;
110#endif
111#if LIBINT2_DEFINED(eri,LIBINT_T_SS_EREP_SS(9))
112 case 9:
113 Data->LIBINT_T_SS_EREP_SS(9)[0] = FjT[9] * scale;
114#endif
115#if LIBINT2_DEFINED(eri,LIBINT_T_SS_EREP_SS(8))
116 case 8:
117 Data->LIBINT_T_SS_EREP_SS(8)[0] = FjT[8] * scale;
118#endif
119#if LIBINT2_DEFINED(eri,LIBINT_T_SS_EREP_SS(7))
120 case 7:
121 Data->LIBINT_T_SS_EREP_SS(7)[0] = FjT[7] * scale;
122#endif
123#if LIBINT2_DEFINED(eri,LIBINT_T_SS_EREP_SS(6))
124 case 6:
125 Data->LIBINT_T_SS_EREP_SS(6)[0] = FjT[6] * scale;
126#endif
127#if LIBINT2_DEFINED(eri,LIBINT_T_SS_EREP_SS(5))
128 case 5:
129 Data->LIBINT_T_SS_EREP_SS(5)[0] = FjT[5] * scale;
130#endif
131#if LIBINT2_DEFINED(eri,LIBINT_T_SS_EREP_SS(4))
132 case 4:
133 Data->LIBINT_T_SS_EREP_SS(4)[0] = FjT[4] * scale;
134#endif
135#if LIBINT2_DEFINED(eri,LIBINT_T_SS_EREP_SS(3))
136 case 3:
137 Data->LIBINT_T_SS_EREP_SS(3)[0] = FjT[3] * scale;
138#endif
139#if LIBINT2_DEFINED(eri,LIBINT_T_SS_EREP_SS(2))
140 case 2:
141 Data->LIBINT_T_SS_EREP_SS(2)[0] = FjT[2] * scale;
142#endif
143#if LIBINT2_DEFINED(eri,LIBINT_T_SS_EREP_SS(1))
144 case 1:
145 Data->LIBINT_T_SS_EREP_SS(1)[0] = FjT[1] * scale;
146#endif
147#if LIBINT2_DEFINED(eri,LIBINT_T_SS_EREP_SS(0))
148 case 0:
149 Data->LIBINT_T_SS_EREP_SS(0)[0] = FjT[0] * scale;
150#endif
151 break;
152 default:
153 throw std::logic_error("assign_FjT() -- max_am exceeded");
154 }
155 }
156
157 inline void assign_ss_r12m1g12_ss(prim_data* Data, const int& jmax, const double* ss_r12m1g12_ss, const double& scale) {
158 switch (jmax) {
159#if LIBINT2_DEFINED(r12kg12,LIBINT_T_SS_Km1G12_SS(28))
160 case 28:
161 Data->LIBINT_T_SS_Km1G12_SS(28)[0] = ss_r12m1g12_ss[28] * scale;
162#endif
163#if LIBINT2_DEFINED(r12kg12,LIBINT_T_SS_Km1G12_SS(27))
164 case 27:
165 Data->LIBINT_T_SS_Km1G12_SS(27)[0] = ss_r12m1g12_ss[27] * scale;
166#endif
167#if LIBINT2_DEFINED(r12kg12,LIBINT_T_SS_Km1G12_SS(26))
168 case 26:
169 Data->LIBINT_T_SS_Km1G12_SS(26)[0] = ss_r12m1g12_ss[26] * scale;
170#endif
171#if LIBINT2_DEFINED(r12kg12,LIBINT_T_SS_Km1G12_SS(25))
172 case 25:
173 Data->LIBINT_T_SS_Km1G12_SS(25)[0] = ss_r12m1g12_ss[25] * scale;
174#endif
175#if LIBINT2_DEFINED(r12kg12,LIBINT_T_SS_Km1G12_SS(24))
176 case 24:
177 Data->LIBINT_T_SS_Km1G12_SS(24)[0] = ss_r12m1g12_ss[24] * scale;
178#endif
179#if LIBINT2_DEFINED(r12kg12,LIBINT_T_SS_Km1G12_SS(23))
180 case 23:
181 Data->LIBINT_T_SS_Km1G12_SS(23)[0] = ss_r12m1g12_ss[23] * scale;
182#endif
183#if LIBINT2_DEFINED(r12kg12,LIBINT_T_SS_Km1G12_SS(22))
184 case 22:
185 Data->LIBINT_T_SS_Km1G12_SS(22)[0] = ss_r12m1g12_ss[22] * scale;
186#endif
187#if LIBINT2_DEFINED(r12kg12,LIBINT_T_SS_Km1G12_SS(21))
188 case 21:
189 Data->LIBINT_T_SS_Km1G12_SS(21)[0] = ss_r12m1g12_ss[21] * scale;
190#endif
191#if LIBINT2_DEFINED(r12kg12,LIBINT_T_SS_Km1G12_SS(20))
192 case 20:
193 Data->LIBINT_T_SS_Km1G12_SS(20)[0] = ss_r12m1g12_ss[20] * scale;
194#endif
195#if LIBINT2_DEFINED(r12kg12,LIBINT_T_SS_Km1G12_SS(19))
196 case 19:
197 Data->LIBINT_T_SS_Km1G12_SS(19)[0] = ss_r12m1g12_ss[19] * scale;
198#endif
199#if LIBINT2_DEFINED(r12kg12,LIBINT_T_SS_Km1G12_SS(18))
200 case 18:
201 Data->LIBINT_T_SS_Km1G12_SS(18)[0] = ss_r12m1g12_ss[18] * scale;
202#endif
203#if LIBINT2_DEFINED(r12kg12,LIBINT_T_SS_Km1G12_SS(17))
204 case 17:
205 Data->LIBINT_T_SS_Km1G12_SS(17)[0] = ss_r12m1g12_ss[17] * scale;
206#endif
207#if LIBINT2_DEFINED(r12kg12,LIBINT_T_SS_Km1G12_SS(16))
208 case 16:
209 Data->LIBINT_T_SS_Km1G12_SS(16)[0] = ss_r12m1g12_ss[16] * scale;
210#endif
211#if LIBINT2_DEFINED(r12kg12,LIBINT_T_SS_Km1G12_SS(15))
212 case 15:
213 Data->LIBINT_T_SS_Km1G12_SS(15)[0] = ss_r12m1g12_ss[15] * scale;
214#endif
215#if LIBINT2_DEFINED(r12kg12,LIBINT_T_SS_Km1G12_SS(14))
216 case 14:
217 Data->LIBINT_T_SS_Km1G12_SS(14)[0] = ss_r12m1g12_ss[14] * scale;
218#endif
219#if LIBINT2_DEFINED(r12kg12,LIBINT_T_SS_Km1G12_SS(13))
220 case 13:
221 Data->LIBINT_T_SS_Km1G12_SS(13)[0] = ss_r12m1g12_ss[13] * scale;
222#endif
223#if LIBINT2_DEFINED(r12kg12,LIBINT_T_SS_Km1G12_SS(12))
224 case 12:
225 Data->LIBINT_T_SS_Km1G12_SS(12)[0] = ss_r12m1g12_ss[12] * scale;
226#endif
227#if LIBINT2_DEFINED(r12kg12,LIBINT_T_SS_Km1G12_SS(11))
228 case 11:
229 Data->LIBINT_T_SS_Km1G12_SS(11)[0] = ss_r12m1g12_ss[11] * scale;
230#endif
231#if LIBINT2_DEFINED(r12kg12,LIBINT_T_SS_Km1G12_SS(10))
232 case 10:
233 Data->LIBINT_T_SS_Km1G12_SS(10)[0] = ss_r12m1g12_ss[10] * scale;
234#endif
235#if LIBINT2_DEFINED(r12kg12,LIBINT_T_SS_Km1G12_SS(9))
236 case 9:
237 Data->LIBINT_T_SS_Km1G12_SS(9)[0] = ss_r12m1g12_ss[9] * scale;
238#endif
239#if LIBINT2_DEFINED(r12kg12,LIBINT_T_SS_Km1G12_SS(8))
240 case 8:
241 Data->LIBINT_T_SS_Km1G12_SS(8)[0] = ss_r12m1g12_ss[8] * scale;
242#endif
243#if LIBINT2_DEFINED(r12kg12,LIBINT_T_SS_Km1G12_SS(7))
244 case 7:
245 Data->LIBINT_T_SS_Km1G12_SS(7)[0] = ss_r12m1g12_ss[7] * scale;
246#endif
247#if LIBINT2_DEFINED(r12kg12,LIBINT_T_SS_Km1G12_SS(6))
248 case 6:
249 Data->LIBINT_T_SS_Km1G12_SS(6)[0] = ss_r12m1g12_ss[6] * scale;
250#endif
251#if LIBINT2_DEFINED(r12kg12,LIBINT_T_SS_Km1G12_SS(5))
252 case 5:
253 Data->LIBINT_T_SS_Km1G12_SS(5)[0] = ss_r12m1g12_ss[5] * scale;
254#endif
255#if LIBINT2_DEFINED(r12kg12,LIBINT_T_SS_Km1G12_SS(4))
256 case 4:
257 Data->LIBINT_T_SS_Km1G12_SS(4)[0] = ss_r12m1g12_ss[4] * scale;
258#endif
259#if LIBINT2_DEFINED(r12kg12,LIBINT_T_SS_Km1G12_SS(3))
260 case 3:
261 Data->LIBINT_T_SS_Km1G12_SS(3)[0] = ss_r12m1g12_ss[3] * scale;
262#endif
263#if LIBINT2_DEFINED(r12kg12,LIBINT_T_SS_Km1G12_SS(2))
264 case 2:
265 Data->LIBINT_T_SS_Km1G12_SS(2)[0] = ss_r12m1g12_ss[2] * scale;
266#endif
267#if LIBINT2_DEFINED(r12kg12,LIBINT_T_SS_Km1G12_SS(1))
268 case 1:
269 Data->LIBINT_T_SS_Km1G12_SS(1)[0] = ss_r12m1g12_ss[1] * scale;
270#endif
271#if LIBINT2_DEFINED(r12kg12,LIBINT_T_SS_Km1G12_SS(0))
272 case 0:
273 Data->LIBINT_T_SS_Km1G12_SS(0)[0] = ss_r12m1g12_ss[0] * scale;
274#endif
275 break;
276 default:
277 throw std::logic_error("assign_ss_r12m1g12_ss() -- max_am exceeded");
278 }
279 }
280};
281
282#endif
283

Generated at Wed Sep 25 2024 02:45:29 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.12.0.