60 template <
typename Shell,
size_t N,
typename IntegralScalar>
64 const auto nbf_left = left_shell_set.numberOfBasisFunctions();
65 const auto nbf_right = right_shell_set.numberOfBasisFunctions();
67 std::array<MatrixX<IntegralScalar>, N> components;
68 for (
auto& component : components) {
74 const auto nsh_left = left_shell_set.numberOfShells();
75 const auto left_shells = left_shell_set.asVector();
76 const auto nsh_right = right_shell_set.numberOfShells();
77 const auto right_shells = right_shell_set.asVector();
79 for (
size_t left_shell_index = 0; left_shell_index < nsh_left; left_shell_index++) {
80 const auto left_bf_index = left_shell_set.basisFunctionIndex(left_shell_index);
81 const auto left_shell = left_shells[left_shell_index];
83 for (
size_t right_shell_index = 0; right_shell_index < nsh_right; right_shell_index++) {
84 const auto right_bf_index = right_shell_set.basisFunctionIndex(right_shell_index);
85 const auto right_shell = right_shells[right_shell_index];
87 const auto buffer = engine.calculate(left_shell, right_shell);
90 if (buffer->areIntegralsAllZero()) {
93 buffer->emplace(components, left_bf_index, right_bf_index);
112 template <
typename Shell,
size_t N,
typename IntegralScalar>
116 const auto nbf_left = left_shell_set.numberOfBasisFunctions();
117 const auto nbf_right = right_shell_set.numberOfBasisFunctions();
119 std::array<Tensor<IntegralScalar, 4>, N> components;
120 for (
auto& component : components) {
127 const auto nsh_left = left_shell_set.numberOfShells();
128 const auto left_shells = left_shell_set.asVector();
129 const auto nsh_right = right_shell_set.numberOfShells();
130 const auto right_shells = right_shell_set.asVector();
132 for (
size_t left_shell_index1 = 0; left_shell_index1 < nsh_left; left_shell_index1++) {
133 const auto left_bf1_index = left_shell_set.basisFunctionIndex(left_shell_index1);
134 const auto left_shell1 = left_shells[left_shell_index1];
136 for (
size_t left_shell_index2 = 0; left_shell_index2 < nsh_left; left_shell_index2++) {
137 const auto left_bf2_index = left_shell_set.basisFunctionIndex(left_shell_index2);
138 const auto left_shell2 = left_shells[left_shell_index2];
140 for (
size_t right_shell_index1 = 0; right_shell_index1 < nsh_right; right_shell_index1++) {
141 const auto right_bf1_index = right_shell_set.basisFunctionIndex(right_shell_index1);
142 const auto right_shell1 = right_shells[right_shell_index1];
144 for (
size_t right_shell_index2 = 0; right_shell_index2 < nsh_right; right_shell_index2++) {
145 const auto right_bf2_index = right_shell_set.basisFunctionIndex(right_shell_index2);
146 const auto right_shell2 = right_shells[right_shell_index2];
148 const auto buffer = engine.calculate(left_shell1, left_shell2, right_shell1, right_shell2);
151 if (buffer->areIntegralsAllZero()) {
154 buffer->emplace(components, left_bf1_index, left_bf2_index, right_bf1_index, right_bf2_index);
180 template <
typename FQOneElectronOperator>
183 const auto left_shell_set = left_scalar_basis.
shellSet();
184 const auto right_shell_set = right_scalar_basis.
shellSet();
187 const auto max_nprim = std::max(left_shell_set.maximumNumberOfPrimitives(), right_shell_set.maximumNumberOfPrimitives());
188 const auto max_l = std::max(left_shell_set.maximumAngularMomentum(), right_shell_set.maximumAngularMomentum());
208 template <
typename FQOneElectronOperator>
226 const auto left_shell_set = left_scalar_basis.
shellSet();
227 const auto right_shell_set = right_scalar_basis.
shellSet();
230 const auto max_nprim = std::max(left_shell_set.maximumNumberOfPrimitives(), right_shell_set.maximumNumberOfPrimitives());
231 const auto max_l = std::max(left_shell_set.maximumAngularMomentum(), right_shell_set.maximumAngularMomentum());
237 return {integrals[0], integrals[1], integrals[2]};
254 std::array<SquareMatrix<double>, 3> converted_components {};
255 for (
size_t i = 0; i < 3; i++) {
258 return converted_components;
287 const auto left_shell_set = left_scalar_basis.
shellSet();
288 const auto right_shell_set = right_scalar_basis.
shellSet();
291 const auto max_nprim = std::max(left_shell_set.maximumNumberOfPrimitives(), right_shell_set.maximumNumberOfPrimitives());
292 const auto max_l = std::max(left_shell_set.maximumAngularMomentum(), right_shell_set.maximumAngularMomentum());
319 template <
typename FQOneElectronOperator>
322 const auto shell_set = scalar_basis.
shellSet();
342 const auto shell_set = scalar_basis.
shellSet();
346 return {integrals[0], integrals[1], integrals[2]};
362 const auto shell_set = scalar_basis.
shellSet();
Definition: BaseOneElectronIntegralEngine.hpp:37
Definition: BaseTwoElectronIntegralEngine.hpp:37
Definition: CoulombRepulsionOperator.hpp:31
Definition: ElectronicDipoleOperator.hpp:33
Definition: IntegralCalculator.hpp:43
static SquareMatrix< double > calculateLibcintIntegrals(const FQOneElectronOperator &fq_one_op, const ScalarBasis< GTOShell > &scalar_basis)
Definition: IntegralCalculator.hpp:320
static std::array< SquareMatrix< double >, 3 > calculateLibintIntegrals(const ElectronicDipoleOperator &fq_one_op, const ScalarBasis< GTOShell > &scalar_basis)
Definition: IntegralCalculator.hpp:249
static Matrix< double > calculateLibintIntegrals(const FQOneElectronOperator &fq_one_op, const ScalarBasis< GTOShell > &left_scalar_basis, const ScalarBasis< GTOShell > &right_scalar_basis)
Definition: IntegralCalculator.hpp:181
static std::array< SquareMatrix< double >, 3 > calculateLibcintIntegrals(const ElectronicDipoleOperator &fq_one_op, const ScalarBasis< GTOShell > &scalar_basis)
Definition: IntegralCalculator.hpp:340
static SquareMatrix< double > calculateLibintIntegrals(const FQOneElectronOperator &fq_one_op, const ScalarBasis< GTOShell > &scalar_basis)
Definition: IntegralCalculator.hpp:209
static SquareRankFourTensor< double > calculateLibintIntegrals(const CoulombRepulsionOperator &fq_two_op, const ScalarBasis< GTOShell > &scalar_basis)
Definition: IntegralCalculator.hpp:270
static Tensor< double, 4 > calculateLibintIntegrals(const CoulombRepulsionOperator &fq_two_op, const ScalarBasis< GTOShell > &left_scalar_basis, const ScalarBasis< GTOShell > &right_scalar_basis)
Definition: IntegralCalculator.hpp:285
static SquareRankFourTensor< double > calculateLibcintIntegrals(const CoulombRepulsionOperator &fq_op, const ScalarBasis< GTOShell > &scalar_basis)
Definition: IntegralCalculator.hpp:360
static auto calculate(BaseTwoElectronIntegralEngine< Shell, N, IntegralScalar > &engine, const ShellSet< Shell > &left_shell_set, const ShellSet< Shell > &right_shell_set) -> std::array< Tensor< IntegralScalar, 4 >, N >
Definition: IntegralCalculator.hpp:113
static auto calculate(BaseOneElectronIntegralEngine< Shell, N, IntegralScalar > &engine, const ShellSet< Shell > &left_shell_set, const ShellSet< Shell > &right_shell_set) -> std::array< MatrixX< IntegralScalar >, N >
Definition: IntegralCalculator.hpp:61
static std::array< Matrix< double >, 3 > calculateLibintIntegrals(const ElectronicDipoleOperator &fq_one_op, const ScalarBasis< GTOShell > &left_scalar_basis, const ScalarBasis< GTOShell > &right_scalar_basis)
Definition: IntegralCalculator.hpp:224
static auto Libint(const CoulombRepulsionOperator &op, const size_t max_nprim, const size_t max_l) -> LibintTwoElectronIntegralEngine< CoulombRepulsionOperator::NumberOfComponents >
Definition: IntegralEngine.cpp:35
static auto Libcint(const CoulombRepulsionOperator &op, const ShellSet< GTOShell > &shell_set) -> LibcintTwoElectronIntegralEngine< GTOShell, CoulombRepulsionOperator::NumberOfComponents, double >
Definition: IntegralEngine.cpp:103
Definition: Matrix.hpp:47
Definition: ScalarBasis.hpp:41
const ShellSet< Shell > & shellSet() const
Definition: ScalarBasis.hpp:140
Definition: ShellSet.hpp:41
Definition: SquareMatrix.hpp:39
Definition: SquareRankFourTensor.hpp:36
Definition: Tensor.hpp:46
Definition: BaseOneElectronIntegralBuffer.hpp:25