GQCP
Loading...
Searching...
No Matches
GuessVectorUpdate.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
32 public Step<EigenproblemEnvironment<double>> {
33
34public:
35 /*
36 * PUBLIC OVERRIDDEN METHODS
37 */
38
42 std::string description() const override {
43 return "Calculate new guesses for the eigenvectors from the diagonalized subspace matrix.";
44 }
45
46
52 void execute(EigenproblemEnvironment<double>& environment) override {
53
54 // X contains the new guesses for the eigenvectors, V is the subspace and Z are the eigenvectors of the subspace matrix.
55 environment.X = environment.V * environment.Z; // X is a linear combination of the current subspace vectors
56 environment.eigenvectors = environment.X;
57 }
58};
59
60
61} // namespace GQCP
Definition: EigenproblemEnvironment.hpp:35
MatrixX< Scalar > X
Definition: EigenproblemEnvironment.hpp:79
MatrixX< Scalar > V
Definition: EigenproblemEnvironment.hpp:73
MatrixX< Scalar > Z
Definition: EigenproblemEnvironment.hpp:69
MatrixX< Scalar > eigenvectors
Definition: EigenproblemEnvironment.hpp:60
Definition: GuessVectorUpdate.hpp:32
std::string description() const override
Definition: GuessVectorUpdate.hpp:42
void execute(EigenproblemEnvironment< double > &environment) override
Definition: GuessVectorUpdate.hpp:52
Definition: Step.hpp:37
Definition: BaseOneElectronIntegralBuffer.hpp:25