votca 2026-dev
Loading...
Searching...
No Matches
gwbse.h
Go to the documentation of this file.
1/*
2 * Copyright 2009-2022 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_GWBSE_H
22#define VOTCA_XTP_GWBSE_H
23
24// Standard includes
25#include <fstream>
26#include <utility>
27
28// VOTCA includes
30
31// Local VOTCA includes
32#include "bse.h"
33#include "bse_uks.h"
34#include "eigen.h"
36#include "gw.h"
37#include "gw_uks.h"
38#include "inactivescreening.h"
39#include "logger.h"
40#include "qmfragment.h"
41
42namespace votca {
43namespace xtp {
44class Orbitals;
45class AOBasis;
60
61class GWBSE {
62 public:
63 GWBSE(Orbitals& orbitals) : orbitals_(orbitals) {};
64 void Initialize(tools::Property& options);
65
66 std::string Identify() { return "gwbse"; }
67
68 void setLogger(Logger* pLog) { pLog_ = pLog; }
69
70 // Screen GW and BSE by a static polarizable environment (embedded
71 // GW-BSE). R is built in Evaluate, once the auxiliary basis and its
72 // metric exist. Closed shell only.
76
81 inactive_ = std::move(input);
82 }
83
84 bool Evaluate();
85
86 void addoutput(tools::Property& summary);
87
88 private:
89 Eigen::MatrixXd CalculateVXC(const AOBasis& dftbasis);
90 std::pair<Eigen::MatrixXd, Eigen::MatrixXd> CalculateVXCSpinResolved(
91 const AOBasis& dftbasis);
95 // program tasks
96
97 bool do_gw_ = false;
98 bool do_bse_singlets_ = false;
99 bool do_bse_triplets_ = false;
102
103 // options for own Vxc calculation
104 std::string functional_;
105 std::string grid_;
106
109
111 // frozen-core GW (rpamin > 0): include the exchange with the core levels
112 // in Sigma_x (gw.core_exchange)
113 bool core_exchange_ = true;
117
118 bool do_sigma_dump_ = false;
120
121 // basis sets
122 std::string auxbasis_name_;
123 std::string dftbasis_name_;
124
125 std::vector<QMFragment<BSE_Population> > fragments_;
126
130 double inactive_chunk_bytes_ = 0.0; // 0: from the --memory budget
131 double inactive_virtual_cutoff_ = 0.0; // Ha above the LUMO; 0: all
132 // stream_rpa: occupied levels below the QP/BSE windows are not stored;
133 // their response is streamed (InactiveScreening::Responses)
134 bool stream_rpa_ = false;
136 Eigen::MatrixXd StreamedResponse(const AOBasis& auxbasis,
137 const AOBasis& dftbasis,
138 const TCMatrix_gwbse& Mmn,
139 const Eigen::VectorXd& rpa_energies,
140 const std::vector<double>& frequencies,
141 std::vector<Eigen::MatrixXd>& Y) const;
143};
144} // namespace xtp
145} // namespace votca
146
147#endif // VOTCA_XTP_GWBSE_H
class to manage program options with xml serialization functionality
Definition property.h:55
Container to hold Basisfunctions for all atoms.
Definition aobasis.h:42
InactiveScreeningInput::Mode inactive_mode_
Definition gwbse.h:128
Eigen::MatrixXd StreamedResponse(const AOBasis &auxbasis, const AOBasis &dftbasis, const TCMatrix_gwbse &Mmn, const Eigen::VectorXd &rpa_energies, const std::vector< double > &frequencies, std::vector< Eigen::MatrixXd > &Y) const
Definition gwbse.cc:1748
InactiveScreeningInput inactive_
Definition gwbse.h:142
bool do_bse_exciton_uks_
Definition gwbse.h:101
std::pair< Eigen::MatrixXd, Eigen::MatrixXd > CalculateVXCSpinResolved(const AOBasis &dftbasis)
Definition gwbse.cc:1020
std::vector< QMFragment< BSE_Population > > fragments_
Definition gwbse.h:125
std::string sigma_plot_states_
Definition gwbse.h:110
void setScreeningEnvironment(const ScreeningEnvironment &env)
Definition gwbse.h:73
ScreeningEnvironment environment_
Definition gwbse.h:127
Index streamed_holes_
Definition gwbse.h:135
double inactive_virtual_cutoff_
Definition gwbse.h:131
BSE::options bseopt_
Definition gwbse.h:108
void addoutput(tools::Property &summary)
Definition gwbse.cc:810
bool do_bse_triplets_
Definition gwbse.h:99
std::string Identify()
Definition gwbse.h:66
std::string grid_
Definition gwbse.h:105
GW::sigma_dump_options sigma_dump_opt_
Definition gwbse.h:119
std::string auxbasis_name_
Definition gwbse.h:122
bool do_bse_singlets_
Definition gwbse.h:98
bool core_exchange_
Definition gwbse.h:113
GWBSE(Orbitals &orbitals)
Definition gwbse.h:63
Orbitals & orbitals_
Definition gwbse.h:94
Eigen::MatrixXd CalculateVXC(const AOBasis &dftbasis)
Definition gwbse.cc:980
Index sigma_plot_steps_
Definition gwbse.h:114
std::string functional_
Definition gwbse.h:104
std::string dftbasis_name_
Definition gwbse.h:123
double inactive_chunk_bytes_
Definition gwbse.h:130
void setInactiveScreening(InactiveScreeningInput input)
Definition gwbse.h:80
bool do_sigma_dump_
Definition gwbse.h:118
void Initialize(tools::Property &options)
Definition gwbse.cc:77
Index CountCoreLevels()
Definition gwbse.cc:56
GW::options gwopt_
Definition gwbse.h:107
double sigma_plot_spacing_
Definition gwbse.h:115
void setLogger(Logger *pLog)
Definition gwbse.h:68
Logger * pLog_
Definition gwbse.h:93
std::string sigma_plot_filename_
Definition gwbse.h:116
bool do_dynamical_screening_bse_
Definition gwbse.h:100
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
Provides a means for comparing floating point numbers.
Definition basebead.h:33
Eigen::Index Index
Definition types.h:26
Options of DumpSigma (energies in Hartree unless noted).
Definition gw.h:269
What GWBSE needs to add the static screening of the inactive region: the mode and the orbitals of the...
The polarizable environment a GW-BSE calculation is screened by: what a QM/MM job hands to GWBSE (GWB...