GQCP
Loading...
Searching...
No Matches
UOrbitalRotationGenerators.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
25#include "Utilities/complex.hpp"
26
27
28namespace GQCP {
29
30
31/*
32 * MARK: UOrbitalRotationGenerators implementation
33 */
34
40template <typename _Scalar>
42 public SpinResolvedBase<UOrbitalRotationGeneratorsComponent<_Scalar>, UOrbitalRotationGenerators<_Scalar>> {
43public:
44 // The scalar type used for an orbital rotation generator: real or complex.
45 using Scalar = _Scalar;
46
47 // The type of 'this'.
49
50 // The type component this spin resolved object is made of.
52
53
54public:
55 /*
56 * MARK: Constructors
57 */
58
59 // Inherit `SpinResolvedBase`'s constructors.
61
62
63 /*
64 * MARK Named constructors
65 */
66
77 static UOrbitalRotationGenerators<Scalar> FromOccupationTypes(const UOrbitalRotationGenerators& generators, const OccupationType row_occupation_type, const OccupationType column_occupation_type, const size_t K) {
78
79 return UOrbitalRotationGenerators<Scalar> {UOrbitalRotationGeneratorsComponent<Scalar>::FromOccupationTypes(generators.alpha(), row_occupation_type, column_occupation_type, K), UOrbitalRotationGeneratorsComponent<Scalar>::FromOccupationTypes(generators.beta(), row_occupation_type, column_occupation_type, K)};
80 }
81
82
83 /*
84 * MARK: Access
85 */
86
91
92 return SpinResolved<SquareMatrix<Scalar>> {this->alpha().asMatrix(), this->beta().asMatrix()};
93 }
94
99
100 return SpinResolved<VectorX<Scalar>> {this->alpha().asVector(), this->beta().asVector()};
101 }
102
103
108
110 }
111};
112
113
114} // namespace GQCP
size_t numberOfOrbitals() const
Definition: SimpleOrbitalRotationGenerators.hpp:144
static DerivedOrbitalRotationGenerators FromOccupationTypes(const DerivedOrbitalRotationGenerators &generators, const OccupationType row_occupation_type, const OccupationType column_occupation_type, const size_t K)
Definition: SimpleOrbitalRotationGenerators.hpp:102
const VectorX< Scalar > & asVector() const
Definition: SimpleOrbitalRotationGenerators.hpp:138
const SquareMatrix< Scalar > asMatrix() const
Definition: SimpleOrbitalRotationGenerators.hpp:128
Definition: SpinResolvedBase.hpp:39
UOrbitalRotationGeneratorsComponent< _Scalar > Of
Definition: SpinResolvedBase.hpp:42
const Of & beta() const
Definition: SpinResolvedBase.hpp:140
const Of & alpha() const
Definition: SpinResolvedBase.hpp:130
Definition: SpinResolved.hpp:34
Definition: UOrbitalRotationGeneratorsComponent.hpp:39
Definition: UOrbitalRotationGenerators.hpp:42
const SpinResolved< SquareMatrix< Scalar > > asMatrix() const
Definition: UOrbitalRotationGenerators.hpp:90
typename SpinResolvedBase< UOrbitalRotationGeneratorsComponent< Scalar >, Self >::Of ComponentType
Definition: UOrbitalRotationGenerators.hpp:51
_Scalar Scalar
Definition: UOrbitalRotationGenerators.hpp:45
static UOrbitalRotationGenerators< Scalar > FromOccupationTypes(const UOrbitalRotationGenerators &generators, const OccupationType row_occupation_type, const OccupationType column_occupation_type, const size_t K)
Definition: UOrbitalRotationGenerators.hpp:77
SpinResolved< size_t > numberOfOrbitals() const
Definition: UOrbitalRotationGenerators.hpp:107
SpinResolved< VectorX< Scalar > > asVector() const
Definition: UOrbitalRotationGenerators.hpp:98
Definition: BaseOneElectronIntegralBuffer.hpp:25
OccupationType
Definition: OccupationType.hpp:29