GQCP
Loading...
Searching...
No Matches
transform.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
26
27namespace GQCP {
28
29
30/*
31 * MARK: Transformations
32 */
33
43template <typename TransformationType, typename TransformableType>
44void transform(const TransformationType& T, TransformableType& transformable) {
45 transformable.transform(T);
46}
47
48
60template <typename TransformationType, typename First, typename... Others>
61void transform(const TransformationType& T, First& first, Others&... others) {
62
63 // Transform the first object, and forward the remaining objects.
64 first.transform(T);
65 transform(T, others...);
66}
67
68
69/*
70 * MARK: Rotations
71 */
72
82template <typename RotationType, typename RotatableType>
83void rotate(const RotationType& U, RotatableType& rotatable) {
84 rotatable.rotate(U);
85}
86
87
99template <typename RotationType, typename First, typename... Others>
100void rotate(const RotationType& U, First& first, Others&... others) {
101
102 // Rotate the first object, and forward the remaining objects.
103 first.rotate(U);
104 rotate(U, others...);
105}
106
107
108} // namespace GQCP
Definition: BaseOneElectronIntegralBuffer.hpp:25
void rotate(const RotationType &U, RotatableType &rotatable)
Definition: transform.hpp:83
void transform(const TransformationType &T, TransformableType &transformable)
Definition: transform.hpp:44