69 const auto& coefs_row =
70 libint2::solidharmonics::SolidHarmonicsCoefficients<double>::instance(
72 const auto& coefs_col =
73 libint2::solidharmonics::SolidHarmonicsCoefficients<double>::instance(
75 int npure_row = 2 * int(l_row) + 1;
76 int npure_col = 2 * int(l_col) + 1;
77 Matrix spherical = Matrix::Zero(npure_row, npure_col);
79 for (
auto s1 = 0; s1 != npure_row; ++s1) {
83 coefs_row.row_idx(s1);
84 const auto* c1_vals = coefs_row.row_values(
87 for (
auto s2 = 0; s2 != npure_col; ++s2) {
90 const auto* c2_idxs = coefs_col.row_idx(s2);
92 const auto* c2_vals = coefs_col.row_values(
94 for (
size_t ic1 = 0; ic1 != nc1;
96 auto c1 = c1_idxs[ic1];
97 auto s1_c1_coeff = c1_vals[ic1];
98 for (
size_t ic2 = 0; ic2 != nc2;
100 auto c2 = c2_idxs[ic2];
101 auto s2_c2_coeff = c2_vals[ic2];
102 spherical(s1, s2) += cartesian(c1, c2) * s1_c1_coeff * s2_c2_coeff;
179 return {0, 1, 0, 0, 2, 1, 1, 0, 0, 0, 3, 2, 2, 1, 1, 1, 0, 0, 0, 0, 4,
180 3, 3, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 5, 4, 4, 3, 3, 3, 2,
181 2, 2, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 6, 5, 5, 4, 4, 4, 3,
182 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0,
183 7, 6, 6, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2,
184 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 8, 7, 7, 6, 6, 6,
185 5, 5, 5, 5, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2,
186 2, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0};
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};
212 return {0, 0, 0, 0, 1, 2, 3, 0, 0, 0, 4, 5, 6, 7,
213 8, 9, 0, 0, 0, 0, 10, 11, 12, 13, 14, 15, 16, 17,
214 18, 19, 0, 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 26,
215 27, 28, 29, 30, 31, 32, 33, 34, 0, 0, 0, 0, 0, 0,
216 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
217 49, 50, 51, 52, 53, 54, 55, 0, 0, 0, 0, 0, 0, 0,
218 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
219 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
220 0, 0, 0, 0, 0, 0, 0, 0, 84, 85, 86, 87, 88, 89,
221 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103,
222 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
223 118, 119, 0, 0, 0, 0, 0, 0, 0, 0, 0};
226 return {0, 0, 0, 0, 0, 1, 0, 2, 3, 0, 0, 4, 0, 5,
227 6, 0, 7, 8, 9, 0, 0, 10, 0, 11, 12, 0, 13, 14,
228 15, 0, 16, 17, 18, 19, 0, 0, 20, 0, 21, 22, 0, 23,
229 24, 25, 0, 26, 27, 28, 29, 0, 30, 31, 32, 33, 34, 0,
230 0, 35, 0, 36, 37, 0, 38, 39, 40, 0, 41, 42, 43, 44,
231 0, 45, 46, 47, 48, 49, 0, 50, 51, 52, 53, 54, 55, 0,
232 0, 56, 0, 57, 58, 0, 59, 60, 61, 0, 62, 63, 64, 65,
233 0, 66, 67, 68, 69, 70, 0, 71, 72, 73, 74, 75, 76, 0,
234 77, 78, 79, 80, 81, 82, 83, 0, 0, 84, 0, 85, 86, 0,
235 87, 88, 89, 0, 90, 91, 92, 93, 0, 94, 95, 96, 97, 98,
236 0, 99, 100, 101, 102, 103, 104, 0, 105, 106, 107, 108, 109, 110,
237 111, 0, 112, 113, 114, 115, 116, 117, 118, 119, 0};
241 return {0, 0, 0, 0, 0, 0, 1, 0, 2, 3, 0, 0, 4, 0,
242 5, 6, 0, 7, 8, 9, 0, 0, 10, 0, 11, 12, 0, 13,
243 14, 15, 0, 16, 17, 18, 19, 0, 0, 20, 0, 21, 22, 0,
244 23, 24, 25, 0, 26, 27, 28, 29, 0, 30, 31, 32, 33, 34,
245 0, 0, 35, 0, 36, 37, 0, 38, 39, 40, 0, 41, 42, 43,
246 44, 0, 45, 46, 47, 48, 49, 0, 50, 51, 52, 53, 54, 55,
247 0, 0, 56, 0, 57, 58, 0, 59, 60, 61, 0, 62, 63, 64,
248 65, 0, 66, 67, 68, 69, 70, 0, 71, 72, 73, 74, 75, 76,
249 0, 77, 78, 79, 80, 81, 82, 83, 0, 0, 84, 0, 85, 86,
250 0, 87, 88, 89, 0, 90, 91, 92, 93, 0, 94, 95, 96, 97,
251 98, 0, 99, 100, 101, 102, 103, 104, 0, 105, 106, 107, 108, 109,
252 110, 111, 0, 112, 113, 114, 115, 116, 117, 118, 119};
256 return {1, 4, 5, 6, 10, 11, 12, 13, 14, 15, 20, 21, 22, 23,
257 24, 25, 26, 27, 28, 29, 35, 36, 37, 38, 39, 40, 41, 42,
258 43, 44, 45, 46, 47, 48, 49, 56, 57, 58, 59, 60, 61, 62,
259 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
260 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
261 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
262 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133,
263 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147,
264 148, 149, 150, 151, 152, 153, 154, 155};
268 return {2, 5, 7, 8, 11, 13, 14, 16, 17, 18, 21, 23, 24, 26,
269 27, 28, 30, 31, 32, 33, 36, 38, 39, 41, 42, 43, 45, 46,
270 47, 48, 50, 51, 52, 53, 54, 57, 59, 60, 62, 63, 64, 66,
271 67, 68, 69, 71, 72, 73, 74, 75, 77, 78, 79, 80, 81, 82,
272 85, 87, 88, 90, 91, 92, 94, 95, 96, 97, 99, 100, 101, 102,
273 103, 105, 106, 107, 108, 109, 110, 112, 113, 114, 115, 116, 117, 118,
274 121, 123, 124, 126, 127, 128, 130, 131, 132, 133, 135, 136, 137, 138,
275 139, 141, 142, 143, 144, 145, 146, 148, 149, 150, 151, 152, 153, 154,
276 156, 157, 158, 159, 160, 161, 162, 163};
280 return {3, 6, 8, 9, 12, 14, 15, 17, 18, 19, 22, 24, 25, 27,
281 28, 29, 31, 32, 33, 34, 37, 39, 40, 42, 43, 44, 46, 47,
282 48, 49, 51, 52, 53, 54, 55, 58, 60, 61, 63, 64, 65, 67,
283 68, 69, 70, 72, 73, 74, 75, 76, 78, 79, 80, 81, 82, 83,
284 86, 88, 89, 91, 92, 93, 95, 96, 97, 98, 100, 101, 102, 103,
285 104, 106, 107, 108, 109, 110, 111, 113, 114, 115, 116, 117, 118, 119,
286 122, 124, 125, 127, 128, 129, 131, 132, 133, 134, 136, 137, 138, 139,
287 140, 142, 143, 144, 145, 146, 147, 149, 150, 151, 152, 153, 154, 155,
288 157, 158, 159, 160, 161, 162, 163, 164};