GQCP
Loading...
Searching...
No Matches
BaseFQOperator.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
20
22
23
24namespace GQCP {
25
26
27/*
28 * MARK: BaseFQOperator implementation
29 */
30
38template <size_t N, typename _Scalar, typename _Vectorizer>
40public:
41 // The number of electrons related to this operator: usually 1 or 2.
42 static constexpr auto NumberOfElectrons = N;
43
44 // The scalar representation of the operator: real or complex.
45 using Scalar = _Scalar;
46
47 // The type of the vectorizer that relates to the tensor structure of one-electron operators. This allows for a distinction between scalar operators (such as the kinetic energy operator), vector operators (such as the spin operator) and matrix/tensor operators (such as quadrupole and multipole operators).
48 using Vectorizer = _Vectorizer;
49
50
51public:
52 /*
53 * MARK: Destructor
54 */
55
56 virtual ~BaseFQOperator() {}
57};
58
59
60/*
61 * MARK: BaseScalarFQOperator
62 */
63
70template <size_t N, typename _Scalar>
72 public BaseFQOperator<N, _Scalar, ScalarVectorizer> {
73public:
74 /*
75 * MARK: Vectorizer
76 */
77
78 // The number of components of the operator.
79 static constexpr size_t NumberOfComponents = 1;
80
81 // The vectorizer related to this operator.
83};
84
85// Instantiate the static const vectorizer.
86template <size_t N, typename _Scalar>
88
89
90/*
91 * MARK: Convenience aliases for one-electron operators
92 */
93
94// A scalar-like one-electron operator.
95template <typename Scalar>
97
98// A vector-like one-electron operator.
99template <typename Scalar>
101
102// A matrix-like one-electron operator.
103template <typename Scalar>
105
106// A tensor-like one-electron operator.
107template <typename Scalar, size_t N>
109
110
111/*
112 * MARK: Convenience aliases for two-electron operators
113 */
114
115// A scalar-like two-electron operator.
116template <typename Scalar>
118
119// A vector-like two-electron operator.
120template <typename Scalar>
122
123// A matrix-like two-electron operator.
124template <typename Scalar>
126
127// A tensor-like two-electron operator.
128template <typename Scalar, size_t N>
130
131
132} // namespace GQCP
Definition: BaseFQOperator.hpp:39
virtual ~BaseFQOperator()
Definition: BaseFQOperator.hpp:56
_Vectorizer Vectorizer
Definition: BaseFQOperator.hpp:48
static constexpr auto NumberOfElectrons
Definition: BaseFQOperator.hpp:42
_Scalar Scalar
Definition: BaseFQOperator.hpp:45
Definition: BaseFQOperator.hpp:72
static constexpr size_t NumberOfComponents
Definition: BaseFQOperator.hpp:79
static const ScalarVectorizer vectorizer
Definition: BaseFQOperator.hpp:82
Definition: DenseVectorizer.hpp:49
Definition: BaseOneElectronIntegralBuffer.hpp:25