votca 2026-dev
Loading...
Searching...
No Matches
dftgwbse.h
Go to the documentation of this file.
1/*
2 * Copyright 2009-2020 The VOTCA Development Team
3 * (http://www.votca.org)
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License")
6 *
7 * You may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 */
19
20#pragma once
21#ifndef VOTCA_XTP_DFTGWBSE_H
22#define VOTCA_XTP_DFTGWBSE_H
23
24// Standard includes
25#include <cstdio>
26
27// Local VOTCA includes
28#include "votca/xtp/dftengine.h"
29#include "votca/xtp/logger.h"
30#include "votca/xtp/orbitals.h"
31#include "votca/xtp/qmstate.h"
32#include "votca/xtp/qmtool.h"
33
34namespace votca {
35namespace xtp {
36
37class DftGwBse final : public QMTool {
38 public:
39 DftGwBse() = default;
40
41 ~DftGwBse() = default;
42
43 std::string Identify() const { return "dftgwbse"; }
44
45 protected:
46 void ParseOptions(const tools::Property& user_options);
47 bool Run();
48
49 private:
50 std::string guess_file_;
51 // Separate from guess_file_ above: guess_file_ loads BOTH geometry
52 // and MOs from the same .orb checkpoint (via Orbitals::ReadFromCpt),
53 // which cannot represent "new geometry, but warm-started MOs from a
54 // previous, different geometry" -- exactly what a geometry
55 // optimization needs between steps. moguess_file_ loads ONLY the
56 // MOs from a separate .orb file, leaving the geometry itself to come
57 // from xyzfile_ as usual. See this class's own Run() for how the
58 // two are combined.
59 std::string moguess_file_;
60 std::string mpsfile_;
61 // QMState (e.g. "s1") whose analytic forces are computed after the BSE
64 // orb file of an earlier geometry: follow its excited_state_forces state
66 void ComputeExcitedStateForces(Orbitals& orbitals);
67 // QP levels whose energy gradients are computed, e.g. homo-2:lumo+3
68 std::string qp_gradients_;
69 void ComputeQPGradients(Orbitals& orbitals);
70 std::string relaxed_density_;
71 void ComputeRelaxedDensity(Orbitals& orbitals);
72 // tasks = gradients: gradients from the orb file of an earlier run
73 bool gradients_only_ = false;
74 void CheckStoredRun(const Orbitals& orbitals) const;
76 const Orbitals& orbitals);
77 static std::vector<Index> ParseLevels(const std::string& text, Index homo);
78 QMState FollowState(const Orbitals& orbitals);
79
80 std::string xyzfile_;
81 std::string xml_output_; // .xml output
82 std::string archive_file_; // .orb file to parse to
83
87
89};
90
91} // namespace xtp
92} // namespace votca
93
94#endif // VOTCA_XTP_DFTGWBSE_H
class to manage program options with xml serialization functionality
Definition property.h:55
void ParseOptions(const tools::Property &user_options)
Definition dftgwbse.cc:41
std::string guess_file_
Definition dftgwbse.h:50
tools::Property geoopt_options_
Definition dftgwbse.h:86
tools::Property package_options_
Definition dftgwbse.h:84
std::string mpsfile_
Definition dftgwbse.h:60
std::string archive_file_
Definition dftgwbse.h:82
std::string excited_state_forces_
Definition dftgwbse.h:62
void ComputeExcitedStateForces(Orbitals &orbitals)
Definition dftgwbse.cc:513
bool excited_state_forces_qp_response_
Definition dftgwbse.h:63
std::string moguess_file_
Definition dftgwbse.h:59
std::string xml_output_
Definition dftgwbse.h:81
void SetupQPResponse(DFTEngine::BSEGradientInput &input, const Orbitals &orbitals)
Definition dftgwbse.cc:297
QMState FollowState(const Orbitals &orbitals)
Definition dftgwbse.cc:257
std::string excited_state_forces_follow_
Definition dftgwbse.h:65
std::string relaxed_density_
Definition dftgwbse.h:70
tools::Property gwbseengine_options_
Definition dftgwbse.h:85
static std::vector< Index > ParseLevels(const std::string &text, Index homo)
Definition dftgwbse.cc:350
std::string Identify() const
Calculator name.
Definition dftgwbse.h:43
std::string qp_gradients_
Definition dftgwbse.h:68
void CheckStoredRun(const Orbitals &orbitals) const
Definition dftgwbse.cc:483
void ComputeQPGradients(Orbitals &orbitals)
Definition dftgwbse.cc:403
void ComputeRelaxedDensity(Orbitals &orbitals)
Definition dftgwbse.cc:321
std::string xyzfile_
Definition dftgwbse.h:80
Logger is used for thread-safe output of messages.
Definition logger.h:164
Container for molecular orbitals and derived one-particle data.
Definition orbitals.h:47
Identifier for QMstates. Strings like S1 are converted into enum +zero indexed int.
Definition qmstate.h:135
Provides a means for comparing floating point numbers.
Definition basebead.h:33
Eigen::Index Index
Definition types.h:26