GQCP
Loading...
Searching...
No Matches
DoublySpinResolvedJacobiRotatable.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
23
24
25namespace GQCP {
26
27
33template <typename T>
35 public JacobiRotatable<T> {
36
37public:
38 // The type of Jacobi rotation for which the basis rotation should be defined.
40
41
42public:
43 /*
44 * MARK: Conforming to `JacobiRotatable`
45 */
46
54 T rotated(const JacobiRotationType& jacobi_rotation) const override {
55
56 // Transform the components of 'this' with the components of the transformation matrix.
57 const auto transformed_aa = static_cast<const T&>(*this).alphaAlpha().rotated(jacobi_rotation.alpha());
58
59 auto transformed_ab = static_cast<const T&>(*this).alphaBeta().rotated(jacobi_rotation.alpha(), Spin::alpha);
60 transformed_ab.rotate(jacobi_rotation.beta(), Spin::beta);
61
62 auto transformed_ba = static_cast<const T&>(*this).betaAlpha().rotated(jacobi_rotation.beta(), Spin::alpha);
63 transformed_ba.rotate(jacobi_rotation.alpha(), Spin::beta);
64
65 const auto transformed_bb = static_cast<const T&>(*this).betaBeta().rotated(jacobi_rotation.beta());
66
67
68 return T {transformed_aa, transformed_ab, transformed_ba, transformed_bb};
69 }
70};
71
72
73} // namespace GQCP
Definition: DoublySpinResolvedJacobiRotatable.hpp:35
T rotated(const JacobiRotationType &jacobi_rotation) const override
Definition: DoublySpinResolvedJacobiRotatable.hpp:54
Definition: JacobiRotatable.hpp:50
const Of & beta() const
Definition: SpinResolvedBase.hpp:140
const Of & alpha() const
Definition: SpinResolvedBase.hpp:130
Definition: UJacobiRotation.hpp:32
Definition: BaseOneElectronIntegralBuffer.hpp:25
@ beta
Definition: Spin.hpp:29
@ alpha
Definition: Spin.hpp:28