41template <
typename _Shell,
size_t _N,
typename _IntegralScalar>
46 static constexpr auto N = _N;
69 libcint_optimizer_function {
LibcintInterfacer().twoElectronOptimizerFunction(op)},
71 shell_set {shell_set} {}
86 std::shared_ptr<BaseTwoElectronIntegralBuffer<IntegralScalar, N>>
calculate(
const Shell& shell1,
const Shell& shell2,
const Shell& shell3,
const Shell& shell4)
override {
97 const size_t nbf1 = shell1.numberOfBasisFunctions();
98 const size_t nbf2 = shell2.numberOfBasisFunctions();
99 const size_t nbf3 = shell3.numberOfBasisFunctions();
100 const size_t nbf4 = shell4.numberOfBasisFunctions();
101 double libcint_buffer[
N * nbf1 * nbf2 * nbf3 * nbf4];
105 const auto result = this->libcint_function(libcint_buffer, shell_indices, this->libcint_raw_container.
atmData(), this->libcint_raw_container.numberOfAtoms(), this->libcint_raw_container.basData(), this->libcint_raw_container.numberOfBasisFunctions(), this->libcint_raw_container.envData(),
nullptr);
108 std::vector<double> buffer_converted {libcint_buffer, libcint_buffer +
N * nbf1 * nbf2 * nbf3 * nbf4};
109 return std::make_shared<LibcintTwoElectronIntegralBuffer<IntegralScalar, N>>(buffer_converted, nbf1, nbf2, nbf3, nbf4, result);
Definition: BaseTwoElectronIntegralEngine.hpp:37
Definition: CoulombRepulsionOperator.hpp:31
Definition: LibcintInterfacer.hpp:86
Definition: LibcintTwoElectronIntegralEngine.hpp:42
_Shell Shell
Definition: LibcintTwoElectronIntegralEngine.hpp:44
LibcintTwoElectronIntegralEngine(const CoulombRepulsionOperator &op, const ShellSet< Shell > &shell_set)
Definition: LibcintTwoElectronIntegralEngine.hpp:67
std::shared_ptr< BaseTwoElectronIntegralBuffer< IntegralScalar, N > > calculate(const Shell &shell1, const Shell &shell2, const Shell &shell3, const Shell &shell4) override
Definition: LibcintTwoElectronIntegralEngine.hpp:86
_IntegralScalar IntegralScalar
Definition: LibcintTwoElectronIntegralEngine.hpp:45
static constexpr auto N
Definition: LibcintTwoElectronIntegralEngine.hpp:46
Definition: ShellSet.hpp:41
const std::vector< Shell > & asVector() const
Definition: ShellSet.hpp:180
Definition: LibcintInterfacer.hpp:180
const int * atmData() const
Definition: LibcintInterfacer.hpp:233
Definition: BaseOneElectronIntegralBuffer.hpp:25
size_t findElementIndex(const std::vector< T > &vector, const T &value)
Definition: miscellaneous.hpp:44
std::function< int(double *, const int *, const int *, int, const int *, int, const double *, const CINTOpt *)> Libcint2eFunction
Definition: LibcintInterfacer.hpp:66
std::function< void(CINTOpt **, const int *, int, const int *, int, const double *)> Libcint2eOptimizerFunction
Definition: LibcintInterfacer.hpp:67