GQCP
Loading...
Searching...
No Matches
SpinResolvedBasisTransformable.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
32template <typename Type>
34 public BasisTransformable<Type> {
35
36public:
37 // The type of the transformation for which the basis transformation should be defined.
39
40
41public:
42 /*
43 * MARK: Conforming to `BasisTransformable`
44 */
45
53 Type transformed(const Transformation& T) const override {
54
55 // Transform the components of 'this' with the components of the transformation matrix.
56 const auto alpha_transformed = static_cast<const Type&>(*this).alpha().transformed(T.alpha());
57 const auto beta_transformed = static_cast<const Type&>(*this).beta().transformed(T.beta());
58
59 return Type {alpha_transformed, beta_transformed};
60 }
61};
62
63
64} // namespace GQCP
Definition: BasisTransformable.hpp:50
Definition: SpinResolvedBasisTransformable.hpp:34
Type transformed(const Transformation &T) const override
Definition: SpinResolvedBasisTransformable.hpp:53
typename BasisTransformableTraits< Type >::Transformation Transformation
Definition: SpinResolvedBasisTransformable.hpp:38
Definition: BaseOneElectronIntegralBuffer.hpp:25
Definition: BasisTransformable.hpp:37