57 Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>;
63 std::vector<libecpint::GaussianShell> basis;
64 std::vector<Index> cartesian_size;
65 std::vector<Index> spherical_size;
66 for (
const auto& shell : aobasis) {
67 libecpint::GaussianShell s(
68 {shell.getPos().x(), shell.getPos().y(), shell.getPos().z()},
70 spherical_size.push_back(shell.getNumFunc());
71 cartesian_size.push_back(shell.getCartesianNumFunc());
74 libint2::Shell s_libint = shell.LibintShell();
75 for (
Index i = 0; i <
Index(s_libint.nprim()); i++) {
76 s.addPrim(s_libint.alpha[i], s_libint.contr[0].coeff[i]);
82 std::vector<libecpint::ECPIntegral> engines(
84 libecpint::ECPIntegral(
int(aobasis.
getMaxL()),
int(ecp.
getMaxL()), 0));
85#pragma omp parallel for schedule(guided)
88 libecpint::ECPIntegral& engine = engines[thread_id];
89 Index bf1 = shell2bf[s1];
90 Index n1 = spherical_size[s1];
91 Index c1 = cartesian_size[s1];
92 for (
Index s2 = 0; s2 <= s1; ++s2) {
93 Index bf2 = shell2bf[s2];
94 Index n2 = spherical_size[s2];
95 Index c2 = cartesian_size[s2];
97 MatrixLibInt cartesian_result = MatrixLibInt::Zero(c1, c2);
98 for (
auto& ecppotential : ecp) {
99 libecpint::TwoIndex<double> results;
100 engine.compute_shell_pair(ecppotential, basis[s1], basis[s2], results);
102 Eigen::Map<MatrixLibInt>(results.data.data(), c1, c2);
105 MatrixLibInt spherical_result = MatrixLibInt::Zero(n1, n2);
106 libint2::solidharmonics::tform<double>(basis[s1].l, basis[s2].l,
107 cartesian_result.data(),
108 spherical_result.data());
109 aopotential_.block(bf1, bf2, n1, n2) = spherical_result;
112 aopotential_.block(bf2, bf1, n2, n1) = spherical_result.transpose();