GQCP
Loading...
Searching...
No Matches
FunctionalOneElectronPrimitiveIntegralEngine.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 two Cartesian GTOs.
51 std::function<IntegralScalar(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
78 IntegralScalar calculate(const CartesianGTO& left, const CartesianGTO& right) const { return this->function(left, right); }
79};
80
81
82} // namespace GQCP
Definition: BaseScalarPrimitiveIntegralEngine.hpp:30
Definition: CartesianGTO.hpp:38
Definition: FunctionalOneElectronPrimitiveIntegralEngine.hpp:37
_IntegralScalar IntegralScalar
Definition: FunctionalOneElectronPrimitiveIntegralEngine.hpp:46
FunctionalOneElectronPrimitiveIntegralEngine(const std::function< IntegralScalar(const CartesianGTO &, const CartesianGTO &)> &function)
Definition: FunctionalOneElectronPrimitiveIntegralEngine.hpp:62
typename Shell::Primitive Primitive
Definition: FunctionalOneElectronPrimitiveIntegralEngine.hpp:43
IntegralScalar calculate(const CartesianGTO &left, const CartesianGTO &right) const
Definition: FunctionalOneElectronPrimitiveIntegralEngine.hpp:78
Definition: GTOShell.hpp:32
CartesianGTO Primitive
Definition: GTOShell.hpp:35
Definition: BaseOneElectronIntegralBuffer.hpp:25