GQCP
Loading...
Searching...
No Matches
CCDIntermediatesUpdate.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 _Scalar>
35 public Step<CCSDEnvironment<_Scalar>> {
36
37public:
38 using Scalar = _Scalar;
40
41
42public:
43 /*
44 * OVERRIDDEN PUBLIC METHODS
45 */
46
50 std::string description() const override {
51 return "Calculate the current CCD intermediates as described in Stanton1991.";
52 }
53
59 void execute(Environment& environment) override {
60
61 // Extract and prepare some variables.
62 const auto& f = environment.f;
63 const auto& V_A = environment.V_A;
64 const auto& t2 = environment.t2_amplitudes.back();
65
66 // Calculate the other CCD intermediates and push them to the environment.
67 environment.F1 = QCModel::CCD<Scalar>::calculateF1(f, V_A, t2);
68 environment.F2 = QCModel::CCD<Scalar>::calculateF2(f, V_A, t2);
69
70 environment.W1 = QCModel::CCD<Scalar>::calculateW1(V_A, t2);
71 environment.W2 = QCModel::CCD<Scalar>::calculateW2(V_A, t2);
72 environment.W3 = QCModel::CCD<Scalar>::calculateW3(V_A, t2);
73 }
74};
75
76
77} // namespace GQCP
Definition: CCDIntermediatesUpdate.hpp:35
std::string description() const override
Definition: CCDIntermediatesUpdate.hpp:50
void execute(Environment &environment) override
Definition: CCDIntermediatesUpdate.hpp:59
_Scalar Scalar
Definition: CCDIntermediatesUpdate.hpp:38
Definition: CCSDEnvironment.hpp:39
SquareRankFourTensor< Scalar > V_A
Definition: CCSDEnvironment.hpp:55
std::deque< T2Amplitudes< Scalar > > t2_amplitudes
Definition: CCSDEnvironment.hpp:49
ImplicitRankFourTensorSlice< Scalar > W2
Definition: CCSDEnvironment.hpp:62
ImplicitMatrixSlice< Scalar > F1
Definition: CCSDEnvironment.hpp:57
SquareMatrix< Scalar > f
Definition: CCSDEnvironment.hpp:54
ImplicitMatrixSlice< Scalar > F2
Definition: CCSDEnvironment.hpp:58
ImplicitRankFourTensorSlice< Scalar > W3
Definition: CCSDEnvironment.hpp:63
ImplicitRankFourTensorSlice< Scalar > W1
Definition: CCSDEnvironment.hpp:61
static ImplicitMatrixSlice< Scalar > calculateF1(const SquareMatrix< Scalar > &f, const SquareRankFourTensor< Scalar > &V_A, const T2Amplitudes< Scalar > &t2)
Definition: CCD.hpp:176
static ImplicitRankFourTensorSlice< Scalar > calculateW2(const SquareRankFourTensor< Scalar > &V_A, const T2Amplitudes< Scalar > &t2)
Definition: CCD.hpp:297
static ImplicitRankFourTensorSlice< Scalar > calculateW1(const SquareRankFourTensor< Scalar > &V_A, const T2Amplitudes< Scalar > &t2)
Definition: CCD.hpp:257
static ImplicitRankFourTensorSlice< Scalar > calculateW3(const SquareRankFourTensor< Scalar > &V_A, const T2Amplitudes< Scalar > &t2)
Definition: CCD.hpp:337
static ImplicitMatrixSlice< Scalar > calculateF2(const SquareMatrix< Scalar > &f, const SquareRankFourTensor< Scalar > &V_A, const T2Amplitudes< Scalar > &t2)
Definition: CCD.hpp:217
Definition: Step.hpp:37
Definition: BaseOneElectronIntegralBuffer.hpp:25