GQCP
Loading...
Searching...
No Matches
RSQTwoElectronOperator.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
30
31
32namespace GQCP {
33
34
41template <typename _Scalar, typename _Vectorizer>
43 public SimpleSQTwoElectronOperator<_Scalar, _Vectorizer, RSQTwoElectronOperator<_Scalar, _Vectorizer>> {
44public:
45 // The scalar type used for a single parameter/matrix element: real or complex.
46 using Scalar = _Scalar;
47
48 //The type of the vectorizer that relates a one-dimensional storage of tensors to the tensor structure of two-electron operators. This distinction is carried over from SimpleSQOneElectronOperator.
49 using Vectorizer = _Vectorizer;
50
51 // The spinor tag corresponding to an `RSQTwoElectronOperator`.
53
54
55public:
56 /*
57 * MARK: Constructors
58 */
59
60 // Inherit `SimpleSQOneElectronOperator`'s constructors.
61 using SimpleSQTwoElectronOperator<_Scalar, _Vectorizer, RSQTwoElectronOperator<_Scalar, _Vectorizer>>::SimpleSQTwoElectronOperator;
62
63
64 /*
65 * MARK: Conversions to spin components
66 */
67
72
73 // Since g_pqrs = g_{p alpha, q alpha, r alpha, s alpha}, we can just wrap the two-electron integrals into the correct class.
76 }
77
78
83
84 // Since g_pqrs = g_{p alpha, q alpha, r beta, s beta}, we can just wrap the two-electron integrals into the correct class.
87 }
88
89
94
95 // The alpha-beta- and beta-alpha integrals are equal for a restricted operator.
96 return this->alphaBeta();
97 }
98
99
100 /*
101 * @return The beta-beta-component of this restricted two-electron operator.
102 */
104
105 // The alpha-alpha- and beta-beta integrals are equal for a restricted operator.
106 return this->alphaAlpha();
107 }
108};
109
110
111/*
112 * MARK: Convenience aliases
113 */
114
115// A scalar-like RSQTwoElectronOperator, i.e. with scalar-like access.
116template <typename Scalar>
118
119// A vector-like RSQTwoElectronOperator, i.e. with vector-like access.
120template <typename Scalar>
122
123// A matrix-like RSQTwoElectronOperator, i.e. with matrix-like access.
124template <typename Scalar>
126
127// A tensor-like RSQTwoElectronOperator, i.e. with tensor-like access.
128template <typename Scalar, size_t N>
130
131
132/*
133 * MARK: Operator traits
134 */
135
142template <typename Scalar, typename Vectorizer>
143struct OperatorTraits<RSQTwoElectronOperator<Scalar, Vectorizer>> {
144
145 // A type that corresponds to the scalar version of the associated restricted two-electron operator type.
147
148 // The type of one-electron operator that is naturally related to a restricted two-electron operator.
150
151 // The type of transformation that is naturally associated to an `RSQTwoElectronOperator`.
153
154 // The type of density matrix that is naturally associated to a restricted two-electron operator.
156
157 // The type of density matrix that is naturally associated to a restricted two-electron operator.
159};
160
161
162/*
163 * MARK: BasisTransformableTraits
164 */
165
172template <typename Scalar, typename Vectorizer>
174
175 // The type of transformation that is naturally associated to an `RSQTwoElectronOperator`.
177};
178
179
180/*
181 * MARK: JacobiRotatableTraits
182 */
183
187template <typename Scalar, typename Vectorizer>
189
190 // The type of Jacobi rotation for which the Jacobi rotation should be defined.
192};
193
194
195} // namespace GQCP
Definition: JacobiRotation.hpp:33
Definition: MixedUSQTwoElectronOperatorComponent.hpp:40
Definition: Orbital1DM.hpp:42
Definition: Orbital2DM.hpp:41
Definition: PureUSQTwoElectronOperatorComponent.hpp:39
Definition: RSQOneElectronOperator.hpp:42
Definition: RSQTwoElectronOperator.hpp:43
_Scalar Scalar
Definition: RSQTwoElectronOperator.hpp:46
_Vectorizer Vectorizer
Definition: RSQTwoElectronOperator.hpp:49
PureUSQTwoElectronOperatorComponent< Scalar, Vectorizer > alphaAlpha() const
Definition: RSQTwoElectronOperator.hpp:71
MixedUSQTwoElectronOperatorComponent< Scalar, Vectorizer > alphaBeta() const
Definition: RSQTwoElectronOperator.hpp:82
MixedUSQTwoElectronOperatorComponent< Scalar, Vectorizer > betaAlpha() const
Definition: RSQTwoElectronOperator.hpp:93
PureUSQTwoElectronOperatorComponent< Scalar, Vectorizer > betaBeta() const
Definition: RSQTwoElectronOperator.hpp:103
Definition: spinor_tags.hpp:27
const std::vector< MatrixRepresentation > & allParameters() const
Definition: SQOperatorStorageBase.hpp:221
const Vectorizer & vectorizer() const
Definition: SQOperatorStorageBase.hpp:282
StorageArray< MatrixRepresentation, Vectorizer > array
Definition: SQOperatorStorageBase.hpp:68
Definition: SimpleSQTwoElectronOperator.hpp:46
Definition: StorageArray.hpp:38
Definition: BaseOneElectronIntegralBuffer.hpp:25
RestrictedSpinorTag RestrictedSpinOrbitalTag
Definition: spinor_tags.hpp:32
Definition: BasisTransformable.hpp:37
Definition: JacobiRotatable.hpp:37
Definition: OperatorTraits.hpp:28