GQCP
Loading...
Searching...
No Matches
FunctionalTwoElectronPrimitiveIntegralEngine.hpp
Go to the documentation of this file.
1// This file is part of GQCG-GQCP.
2//
3// Copyright (C) 2017-2020 the GQCG developers
4//
5// GQCG-GQCP is free software: you can redistribute it and/or modify
6// it under the terms of the GNU Lesser General Public License as published by
7// the Free Software Foundation, either version 3 of the License, or
8// (at your option) any later version.
9//
10// GQCG-GQCP is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU Lesser General Public License for more details.
14//
15// You should have received a copy of the GNU Lesser General Public License
16// along with GQCG-GQCP. If not, see <http://www.gnu.org/licenses/>.
17
18#pragma once
19
23
24#include <functional>
25
26
27namespace GQCP {
28
29
35template <typename _IntegralScalar>
38public:
39 // The type of shell that this integral engine is related to.
40 using Shell = GTOShell;
41
42 // The type of primitive that underlies the type of shell.
43 using Primitive = typename Shell::Primitive;
44
45 // The scalar representation of one of the primitive integrals.
46 using IntegralScalar = _IntegralScalar;
47
48
49private:
50 // A user-supplied custom function that can calculate primitive integrals over four Cartesian GTOs.
51 std::function<IntegralScalar(const CartesianGTO&, const CartesianGTO&, const CartesianGTO&, const CartesianGTO&)> function;
52
53
54public:
55 /*
56 * MARK: Constructors
57 */
58
63 function {function} {}
64
65
66 /*
67 * MARK: Integral calculation
68 */
69
80 IntegralScalar calculate(const CartesianGTO& left1, const CartesianGTO& left2, const CartesianGTO& right1, const CartesianGTO& right2) const { return this->function(left1, left2, right1, right2); }
81};
82
83
84} // namespace GQCP
Definition: BaseScalarPrimitiveIntegralEngine.hpp:30
Definition: CartesianGTO.hpp:38
Definition: FunctionalTwoElectronPrimitiveIntegralEngine.hpp:37
typename Shell::Primitive Primitive
Definition: FunctionalTwoElectronPrimitiveIntegralEngine.hpp:43
FunctionalTwoElectronPrimitiveIntegralEngine(const std::function< IntegralScalar(const CartesianGTO &, const CartesianGTO &, const CartesianGTO &, const CartesianGTO &)> &function)
Definition: FunctionalTwoElectronPrimitiveIntegralEngine.hpp:62
IntegralScalar calculate(const CartesianGTO &left1, const CartesianGTO &left2, const CartesianGTO &right1, const CartesianGTO &right2) const
Definition: FunctionalTwoElectronPrimitiveIntegralEngine.hpp:80
_IntegralScalar IntegralScalar
Definition: FunctionalTwoElectronPrimitiveIntegralEngine.hpp:46
Definition: GTOShell.hpp:32
CartesianGTO Primitive
Definition: GTOShell.hpp:35
Definition: BaseOneElectronIntegralBuffer.hpp:25