votca 2026-dev
Loading...
Searching...
No Matches
gw.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_GW_H
22#define VOTCA_XTP_GW_H
23
24#include <functional>
25#include <unordered_map>
26#include <unordered_set>
27
28// Local VOTCA includes
29#include "dfttimings.h"
30#include "logger.h"
31#include "orbitals.h"
32#include "qp_solver_utils.h"
33#include "rpa.h"
34#include "sigma_base.h"
35#include "threecenter.h"
36
37namespace votca {
38namespace xtp {
39
40class GW {
41
46
47 public:
48 GW(Logger& log, TCMatrix_gwbse& Mmn, const Eigen::MatrixXd& vxc,
49 const Eigen::VectorXd& dft_energies)
50 : log_(log),
51 Mmn_(Mmn),
52 vxc_(vxc),
53 dft_energies_(dft_energies),
54 rpa_(log, Mmn) {};
55
56 struct options {
62 double eta;
63 double g_sc_limit;
67 double shift = 0;
68 double ScaHFX = 0.0;
69 std::string sigma_integration;
70 Index reset_3c; // how often the 3c integrals in iterate should be
71 // rebuilt
72 std::string qp_solver;
73 double qp_solver_alpha = 0.75;
74 // Legacy aliases from the original grid-search implementation.
75 // They used to define both the total QP window and the scan resolution at
76 // the same time. The new implementation keeps them only so that old XML
77 // files and existing tests still work; configuration code maps them onto
78 // the decoupled controls below.
80 double qp_grid_spacing = 0.0;
81
82 // Decoupled QP search controls:
83 // - qp_full_window_half_width defines the outer full search interval
84 // - qp_dense_spacing defines the dense scan used for robust sign changes
85 // - qp_adaptive_shell_width / count define the outward shell search
86 // All values are normalized in configure(); negative values mean "unset"
87 // and trigger either legacy mapping or robust defaults.
88 double qp_full_window_half_width = -1.0; // Ha; <=0 means "unset"
89 double qp_dense_spacing = -1.0; // Ha; <=0 means "unset"
90 double qp_adaptive_shell_width = -1.0; // Ha; <=0 means "unset"
91 Index qp_adaptive_shell_count = 0; // 0 means "use shell width"
92
93 Index gw_mixing_order; // mixing order
94 double gw_mixing_alpha; // mixing alpha, also linear mixing
95 std::string quadrature_scheme; // Kind of Gaussian-quadrature scheme to use
96 Index order; // only needed for complex integration sigma CDA
97 double alpha; // smooth tail in complex integration sigma CDA
98 bool qp_restrict_search = true;
99 // evGW: after the first iteration keep each level on the root branch of
100 // the previous iteration (closest accepted root) instead of re-choosing
101 // by weight
103 // evGW: when W is rebuilt (see ScreeningUpdate): "every" or "adaptive"
104 std::string screening_update = "adaptive";
105 // evGW: after the first iteration search each level's root only near
106 // its previous one (falling back to the full search), verified by one
107 // full search after convergence
108 bool qp_root_tracking = false;
111 double qp_zero_margin = 1e-6;
113 std::string qp_root_finder = "brent";
114 std::string qp_grid_search_mode = "adaptive_with_dense_fallback";
115
116 // QSGW options
117 // When true, run quasiparticle self-consistent GW instead of evGW.
118 // The three-centre integrals are rotated at each iteration so that W and
119 // Sigma are evaluated in the basis of the current QP wavefunctions.
120 bool do_qsgw = false;
122 double qsgw_sc_limit = 1e-5; // Ha; convergence threshold on QP energies
123
124 // Maximum allowed perturbative QP correction for virtual states to be
125 // included in the QSGW self-consistency loop. Virtual states with
126 // |e_QP - e_DFT| > qsgw_max_virt_correction are excluded from the QSGW
127 // window and kept at their perturbative QP energies (DFT-MO wavefunctions).
128 // This prevents pathological high-energy basis-set artefact states from
129 // destabilising the QSGW rotation. Occupied states are never excluded.
130 // Default: 0.5 Ha (13.6 eV, 1 Rydberg) -- corrections above this are
131 // unlikely to be physically meaningful for typical molecular systems.
132 // Set to a large value (e.g. 1e10) to disable the threshold entirely.
133 double qsgw_max_virt_correction = 0.5; // Ha
134 bool qsgw_hartree_update = true; // J follows the QP density
135 // With a reaction field: the Hartree update is with u = v + v_reac, so
136 // the environment's induced dipoles follow the QP density as well.
137 // false: bare v (a control; inconsistent with the dressed W).
139 // Static self-energy of QSGW: "eta" = the symmetrised
140 // 1/2 Re[Sigma(e_p) + Sigma(e_q)] with denominators t/(t^2 + eta^2);
141 // "srg" = the similarity-renormalization-group form of Marie and Loos,
142 // Hermitian by construction, regularized by the flow parameter s (1/Ha^2)
143 std::string qsgw_regularization = "eta";
144 double qsgw_srg_s = 500.0;
145 // RPA energies of levels outside the GW window (OutOfWindowShift)
147 };
148
149 void configure(const options& opt);
150
156 Eigen::VectorXd getGWAResults() const;
157
184 void setReactionField(const Eigen::MatrixXd& R);
189 using ScreeningHook = std::function<void(const Eigen::VectorXd&)>;
191 screening_hook_ = std::move(hook);
192 }
193
197 void setCoreExchange(const Eigen::MatrixXd& X) { core_exchange_ = X; }
198 const Eigen::MatrixXd& getSigmaReac() const { return Sigma_reac_; }
199
200 // Calculates the diagonal elements up to self consistency
202
203 // Calculated offdiagonal elements as well
204 void CalculateHQP();
205
222 void CalculateQSGW();
223
226 const Eigen::MatrixXd& getQSGWRotation() const { return qsgw_rotation_; }
227
229 const Eigen::VectorXd& getQSGWSeedEnergies() const {
230 return qsgw_seed_energies_;
231 }
232
241 void PrintQSGW_Energies(const std::string& seed_label,
242 const Eigen::VectorXd& seed_energies,
243 const Eigen::VectorXd& qsgw_energies) const;
244
254 void PrintQSGW_Composition(double threshold = 0.01) const;
255
256 Eigen::MatrixXd getHQP() const;
257
258 // Diagonalize QP particle Hamiltonian
259 Eigen::SelfAdjointEigenSolver<Eigen::MatrixXd> DiagonalizeQPHamiltonian()
260 const;
261
265 void PlotSigma(std::string filename, Index steps, double spacing,
266 std::string states);
267
270 std::string filename = "sigma_dump.h5";
271 double levels_emax_ev = 20.0; // per-level spectra and imaginary axis
272 // only up to this far above the DFT
273 // LUMO (eV); <= 0: all QP levels
274 Index imag_points = 24; // Gauss-Legendre points on (0, inf)
275 double imag_scale = 0.5; // nu = s (1+x)/(1-x)
276 double spectral_min = -3.0; // pole histogram, absolute energies
277 double spectral_max = 3.0;
278 double spectral_binwidth = 0.02;
279 Index plot_steps = 201; // Sigma_c(omega) of all QP levels on a grid
280 double plot_spacing = 0.01; // around their DFT energies; 0 steps: off
281 };
282
295 void DumpSigma(const sigma_dump_options& dopt, const std::string& gw_mode,
296 const std::string& version);
298 void setKeepScreeningData(bool keep) {
300 if (sigma_) {
301 sigma_->setKeepScreeningData(keep);
302 }
303 }
304
305 Eigen::VectorXd RPAInputEnergies() const {
306 return rpa_.getRPAInputEnergies();
307 }
308
309 private:
313 Eigen::MatrixXd SigmaCurves(const std::vector<Index>& levels, Index steps,
314 double spacing) const;
316 // QP solution of the last solve and the energies in G it used (DumpSigma)
317 Eigen::VectorXd qp_solution_;
318 Eigen::VectorXd rpa_energies_solved_;
319 // wall-clock accounting of the GW steps, reported at the end
321
322 Eigen::MatrixXd Sigma_x_; // Fock exchange with the bare v, only
323 Eigen::MatrixXd Sigma_c_; // dynamic correlation
324 Eigen::MatrixXd reaction_field_; // R, fill-time aux frame; empty: off
326 Eigen::MatrixXd dressing_; // (1 + R)^(1/2), fill-time aux frame
327 void DressForEnvironment();
328 Eigen::MatrixXd Sigma_reac_; // static correlation from v_reac (COH+SEX)
329 void PrintReactionFieldShifts() const;
330 Eigen::MatrixXd qsgw_rotation_; // accumulated U: DFT MOs -> QSGW QP
331 // wavefunctions
332 Eigen::VectorXd qsgw_seed_energies_; // evGW/G0W0 energies used as QSGW seed
333 // Merged QSGW+seed energies for the full QP window. Set by CalculateQSGW()
334 // when the virtual window is trimmed. getGWAResults() returns this when
335 // non-empty, bypassing the sigma-matrix recomputation which would be wrong
336 // for the excluded levels.
337 Eigen::VectorXd qsgw_final_energies_;
338
340
341 std::unique_ptr<Sigma_base> sigma_ = nullptr;
344 const Eigen::MatrixXd& vxc_;
345 const Eigen::VectorXd& dft_energies_;
346
347 Eigen::MatrixXd core_exchange_; // see setCoreExchange
351
353 // small class which calculates f(w) with and df/dw(w)
354 // f=Sigma_c(w)+offset-w
355 // offset= e_dft+Sigma_x-Vxc
356 class QPFunc {
357 public:
358 QPFunc(Index gw_level, const Sigma_base& sigma, double offset)
359 : gw_level_(gw_level), offset_(offset), sigma_c_func_(sigma) {}
360
361 std::pair<double, double> operator()(double frequency) const {
362 std::pair<double, double> result;
363 result.first = value(frequency, EvalStage::Other);
364 result.second = deriv(frequency);
365 return result;
366 }
367
368 double sigma(double frequency, EvalStage stage = EvalStage::Other) const {
369 const std::uint64_t key = FrequencyKey(frequency);
370
371 auto insert_result = seen_frequencies_.insert(key);
372 if (!insert_result.second) {
373 ++stats_.sigma_repeat_calls;
374 } else {
375 ++stats_.sigma_unique_frequencies;
376 }
377
378 CountSigmaStage(stage);
379 auto cached = cache_.find(key);
380 if (cached != cache_.end()) {
381 return cached->second;
382 }
383 return sigma_c_func_.CalcCorrelationDiagElement(gw_level_, frequency);
384 }
385
388 void Prefetch(const std::vector<double>& frequencies) const {
389 std::vector<double> todo;
390 for (double f : frequencies) {
391 if (cache_.find(FrequencyKey(f)) == cache_.end()) {
392 todo.push_back(f);
393 }
394 }
395 if (todo.empty()) {
396 return;
397 }
398 const Eigen::VectorXd values = sigma_c_func_.CalcCorrelationDiagElements(
399 gw_level_,
400 Eigen::Map<const Eigen::VectorXd>(todo.data(), Index(todo.size())));
401 for (std::size_t i = 0; i < todo.size(); ++i) {
402 cache_[FrequencyKey(todo[i])] = values(Index(i));
403 }
404 }
405
406 double value(double frequency, EvalStage stage = EvalStage::Other) const {
407 return sigma(frequency, stage) + offset_ - frequency;
408 }
409
410 double deriv(double frequency) const {
411 ++stats_.deriv_calls;
412 return sigma_c_func_.CalcCorrelationDiagElementDerivative(gw_level_,
413 frequency) -
414 1.0;
415 }
416
417 const QPStats& GetStats() const { return stats_; }
418
419 private:
420 static std::uint64_t FrequencyKey(double x) {
421 std::uint64_t key = 0;
422 static_assert(sizeof(double) == sizeof(std::uint64_t),
423 "Unexpected double size");
424 std::memcpy(&key, &x, sizeof(double));
425 return key;
426 }
427
428 void CountSigmaStage(EvalStage stage) const {
429 switch (stage) {
430 case EvalStage::Scan:
431 ++stats_.sigma_scan_calls;
432 break;
433 case EvalStage::Refine:
434 ++stats_.sigma_refine_calls;
435 break;
436 case EvalStage::Derivative:
437 ++stats_.sigma_derivative_calls;
438 break;
439 case EvalStage::Other:
440 default:
441 ++stats_.sigma_other_calls;
442 break;
443 }
444 }
445
447 double offset_;
449
450 mutable std::unordered_set<std::uint64_t> seen_frequencies_;
451 mutable std::unordered_map<std::uint64_t, double> cache_;
453 };
454
455 double CalcHomoLumoShift(Eigen::VectorXd frequencies) const;
456 Eigen::VectorXd ScissorShift_DFTlevel(
457 const Eigen::VectorXd& dft_energies) const;
458 void PrintQP_Energies(const Eigen::VectorXd& qp_diag_energies) const;
459 void PrintGWA_Energies() const;
460
461 Eigen::VectorXd SolveQP(const Eigen::VectorXd& frequencies) const;
462 // HOMO-LUMO midpoint of the current QP guesses, set by SolveQP before
463 // its parallel loop and only read inside it (SolveQP_Grid).
464 mutable double qp_midgap_ = 0.0;
465 // per level of the last SolveQP: whether two accepted roots carry
466 // comparable weight (see qp_solver::CheckCompetingRoots)
467 mutable std::vector<qp_solver::CompetingRoots> competing_roots_;
468 // root tracking (opt_.qp_root_tracking): the roots of the last QP solve,
469 // their weights and their last change; active from the second iteration
470 // on until the verifying full search
471 mutable Eigen::VectorXd tracked_root_;
472 mutable Eigen::VectorXd tracked_Z_;
473 mutable Eigen::VectorXd tracked_change_;
474 mutable bool tracking_active_ = false;
475 mutable Index tracked_local_ = 0; // levels solved locally in the last solve
477 boost::optional<qp_solver::RootCandidate> SolveQP_Tracked(
478 double intercept0, double frequency0, Index gw_level,
479 QPStats* stats) const;
481 const std::vector<QPRootCandidate>& roots,
482 double chosen) const {
483 if (gw_level < Index(competing_roots_.size())) {
484 competing_roots_[std::size_t(gw_level)] =
485 qp_solver::CheckCompetingRoots(roots, chosen);
486 }
487 }
488 // logs the levels with competing roots of the last SolveQP
489 void PrintCompetingRoots(Log::Level level) const;
490 boost::optional<double> SolveQP_Grid(double intercept0, double frequency0,
491 Index gw_level,
492 QPStats* stats = nullptr) const;
493
494 boost::optional<double> SolveQP_Grid_Windowed(
495 double intercept0, double frequency0, Index gw_level, double left_limit,
496 double right_limit, bool allow_rejected_return = true,
497 QPStats* stats = nullptr) const;
498
499 boost::optional<double> SolveQP_Grid_Windowed_Adaptive(
500 double intercept0, double frequency0, Index gw_level, double left_limit,
501 double right_limit, bool allow_rejected_return = true,
502 QPStats* stats = nullptr) const;
503
504 boost::optional<double> SolveQP_Grid_Windowed_Dense(
505 double intercept0, double frequency0, Index gw_level, double left_limit,
506 double right_limit, bool allow_rejected_return = true,
507 QPStats* stats = nullptr) const;
508
509 boost::optional<double> SolveQP_FixedPoint(double intercept0,
510 double frequency0, Index gw_level,
511 QPStats* stats = nullptr) const;
512 boost::optional<double> SolveQP_Linearisation(double intercept0,
513 double frequency0,
514 Index gw_level,
515 QPStats* stats = nullptr) const;
516 bool Converged(const Eigen::VectorXd& e1, const Eigen::VectorXd& e2,
517 double epsilon) const;
518
519 boost::optional<QPRootCandidate> RefineQPInterval(
520 double lowerbound, double f_lowerbound, double upperbound,
521 double f_upperbound, const QPFunc& f, double reference) const;
522};
523} // namespace xtp
524} // namespace votca
525
526#endif // VOTCA_XTP_GW_H
Wall-clock accounting for the parts of a DFT run.
Definition dfttimings.h:45
void CountSigmaStage(EvalStage stage) const
Definition gw.h:428
std::unordered_map< std::uint64_t, double > cache_
Definition gw.h:451
double value(double frequency, EvalStage stage=EvalStage::Other) const
Definition gw.h:406
double sigma(double frequency, EvalStage stage=EvalStage::Other) const
Definition gw.h:368
const Sigma_base & sigma_c_func_
Definition gw.h:448
const QPStats & GetStats() const
Definition gw.h:417
std::unordered_set< std::uint64_t > seen_frequencies_
Definition gw.h:450
static std::uint64_t FrequencyKey(double x)
Definition gw.h:420
QPFunc(Index gw_level, const Sigma_base &sigma, double offset)
Definition gw.h:358
double deriv(double frequency) const
Definition gw.h:410
void Prefetch(const std::vector< double > &frequencies) const
Definition gw.h:388
std::pair< double, double > operator()(double frequency) const
Definition gw.h:361
boost::optional< double > SolveQP_Grid_Windowed(double intercept0, double frequency0, Index gw_level, double left_limit, double right_limit, bool allow_rejected_return=true, QPStats *stats=nullptr) const
Definition gw.cc:986
Index qptotal_
Definition gw.h:310
Index QPIterations() const
Definition gw.h:153
const Eigen::VectorXd & getQSGWSeedEnergies() const
Return the seed (G0W0/evGW) energies that QSGW started from.
Definition gw.h:229
bool keep_screening_data_
Definition gw.h:315
DFTTimings timings_
Definition gw.h:320
Eigen::MatrixXd reaction_field_
Definition gw.h:324
void setReactionField(const Eigen::MatrixXd &R)
Screen by a static polarizable environment (embedded GW).
Definition gw.cc:72
Eigen::SelfAdjointEigenSolver< Eigen::MatrixXd > DiagonalizeQPHamiltonian() const
Definition gw.cc:135
void PrintGWA_Energies() const
Definition gw.cc:142
Eigen::VectorXd tracked_change_
Definition gw.h:473
double qp_midgap_
Definition gw.h:464
void DumpSigma(const sigma_dump_options &dopt, const std::string &gw_mode, const std::string &version)
Write the self-energy and screening data of the finished GW (G0W0 or evGW, ppm or exact) to a separat...
Definition gw.cc:1726
void setCoreExchange(const Eigen::MatrixXd &X)
Definition gw.h:197
RPA rpa_
Definition gw.h:352
boost::optional< qp_solver::RootCandidate > SolveQP_Tracked(double intercept0, double frequency0, Index gw_level, QPStats *stats) const
Definition gw.cc:739
boost::optional< QPRootCandidate > RefineQPInterval(double lowerbound, double f_lowerbound, double upperbound, double f_upperbound, const QPFunc &f, double reference) const
Index ScreeningBuilds() const
Screening builds and QP iterations of the last evGW run.
Definition gw.h:152
void PrintQSGW_Energies(const std::string &seed_label, const Eigen::VectorXd &seed_energies, const Eigen::VectorXd &qsgw_energies) const
Print a two-column comparison of seed (G0W0 or evGW) vs converged QSGW quasiparticle energies.
Definition gw.cc:225
Index TrackedLocalSolves() const
Level solves of the last evGW run done by root tracking (locally).
Definition gw.h:155
void PrintCompetingRoots(Log::Level level) const
Definition gw.cc:565
void CalculateQSGW()
Run quasiparticle self-consistent GW (QSGW).
Definition gw.cc:1187
bool Converged(const Eigen::VectorXd &e1, const Eigen::VectorXd &e2, double epsilon) const
Definition gw.cc:1134
Index qp_iterations_
Definition gw.h:349
bool tracking_active_
Definition gw.h:474
void configure(const options &opt)
Definition gw.cc:43
boost::optional< double > SolveQP_Grid_Windowed_Adaptive(double intercept0, double frequency0, Index gw_level, double left_limit, double right_limit, bool allow_rejected_return=true, QPStats *stats=nullptr) const
Definition gw.cc:780
options opt_
Definition gw.h:339
Eigen::MatrixXd SigmaCurves(const std::vector< Index > &levels, Index steps, double spacing) const
Definition gw.cc:1634
Eigen::VectorXd qp_solution_
Definition gw.h:317
Eigen::MatrixXd getHQP() const
Definition gw.cc:129
Index tracked_local_total_
Definition gw.h:476
Eigen::VectorXd SolveQP(const Eigen::VectorXd &frequencies) const
Definition gw.cc:590
TCMatrix_gwbse & Mmn_
Definition gw.h:343
Index screening_builds_
Definition gw.h:348
Index gw_sc_iteration_
Definition gw.h:350
qp_solver::EvalStage EvalStage
Definition gw.h:42
void PrintReactionFieldShifts() const
Definition gw.cc:88
void setKeepScreeningData(bool keep)
Call after configure and before CalculateGWPerturbation.
Definition gw.h:298
Eigen::VectorXd rpa_energies_solved_
Definition gw.h:318
qp_solver::Stats QPStats
Definition gw.h:43
boost::optional< double > SolveQP_Grid_Windowed_Dense(double intercept0, double frequency0, Index gw_level, double left_limit, double right_limit, bool allow_rejected_return=true, QPStats *stats=nullptr) const
Definition gw.cc:855
Eigen::MatrixXd Sigma_c_
Definition gw.h:323
qp_solver::RootCandidate QPRootCandidate
Definition gw.h:44
void PrintQSGW_Composition(double threshold=0.01) const
Print the dominant DFT-KS orbital contributions to each converged QSGW quasiparticle state.
Definition gw.cc:182
Eigen::MatrixXd Sigma_reac_
Definition gw.h:328
Eigen::VectorXd qsgw_seed_energies_
Definition gw.h:332
const Eigen::VectorXd & dft_energies_
Definition gw.h:345
std::unique_ptr< Sigma_base > sigma_
Definition gw.h:341
void CalculateHQP()
Definition gw.cc:1147
std::vector< qp_solver::CompetingRoots > competing_roots_
Definition gw.h:467
Eigen::VectorXd qsgw_final_energies_
Definition gw.h:337
Logger & log_
Definition gw.h:342
Eigen::VectorXd getGWAResults() const
Definition gw.cc:554
Eigen::VectorXd RPAInputEnergies() const
Definition gw.h:305
const Eigen::MatrixXd & getSigmaReac() const
Definition gw.h:198
Eigen::VectorXd tracked_Z_
Definition gw.h:472
void DressForEnvironment()
Definition gw.cc:78
qp_solver::WindowDiagnostics QPWindowDiagnostics
Definition gw.h:45
double CalcHomoLumoShift(Eigen::VectorXd frequencies) const
Definition gw.cc:122
boost::optional< double > SolveQP_Grid(double intercept0, double frequency0, Index gw_level, QPStats *stats=nullptr) const
Definition gw.cc:1040
const Eigen::MatrixXd & vxc_
Definition gw.h:344
void RecordCompetingRoots(Index gw_level, const std::vector< QPRootCandidate > &roots, double chosen) const
Definition gw.h:480
void setScreeningHook(ScreeningHook hook)
Definition gw.h:190
void PrintQP_Energies(const Eigen::VectorXd &qp_diag_energies) const
Definition gw.cc:252
Index tracked_local_
Definition gw.h:475
const Eigen::MatrixXd & getQSGWRotation() const
Definition gw.h:226
void PlotSigma(std::string filename, Index steps, double spacing, std::string states)
Definition gw.cc:1666
boost::optional< double > SolveQP_FixedPoint(double intercept0, double frequency0, Index gw_level, QPStats *stats=nullptr) const
Definition gw.cc:1116
Eigen::VectorXd ScissorShift_DFTlevel(const Eigen::VectorXd &dft_energies) const
Definition gw.cc:279
GW(Logger &log, TCMatrix_gwbse &Mmn, const Eigen::MatrixXd &vxc, const Eigen::VectorXd &dft_energies)
Definition gw.h:48
Eigen::MatrixXd Sigma_x_
Definition gw.h:322
boost::optional< double > SolveQP_Linearisation(double intercept0, double frequency0, Index gw_level, QPStats *stats=nullptr) const
Definition gw.cc:761
std::function< void(const Eigen::VectorXd &)> ScreeningHook
Definition gw.h:189
void CalculateGWPerturbation()
Definition gw.cc:287
Eigen::MatrixXd qsgw_rotation_
Definition gw.h:330
Eigen::MatrixXd dressing_
Definition gw.h:326
Eigen::MatrixXd core_exchange_
Definition gw.h:347
ScreeningHook screening_hook_
Definition gw.h:325
Eigen::VectorXd tracked_root_
Definition gw.h:471
Logger is used for thread-safe output of messages.
Definition logger.h:164
CompetingRoots CheckCompetingRoots(const std::vector< RootCandidate > &roots, double chosen)
Provides a means for comparing floating point numbers.
Definition basebead.h:33
Eigen::Index Index
Definition types.h:26
Level
be loud and noisy
Definition globals.h:28
OutOfWindowShift out_of_window_shift
Definition gw.h:146
double qp_full_window_half_width
Definition gw.h:88
double qsgw_sc_limit
Definition gw.h:122
double qsgw_max_virt_correction
Definition gw.h:133
Index qp_adaptive_shell_count
Definition gw.h:91
bool qsgw_hartree_update
Definition gw.h:134
bool qsgw_hartree_screened
Definition gw.h:138
double qp_adaptive_shell_width
Definition gw.h:90
std::string screening_update
Definition gw.h:104
double qp_solver_alpha
Definition gw.h:73
double screening_update_ratio
Definition gw.h:109
double qp_zero_margin
Definition gw.h:111
double gw_sc_limit
Definition gw.h:65
std::string qp_grid_search_mode
Definition gw.h:114
double qp_virtual_min_energy
Definition gw.h:112
Index screening_update_max_inner
Definition gw.h:110
Index gw_mixing_order
Definition gw.h:93
Index gw_sc_max_iterations
Definition gw.h:66
Index qp_grid_steps
Definition gw.h:79
std::string quadrature_scheme
Definition gw.h:95
std::string qp_solver
Definition gw.h:72
Index g_sc_max_iterations
Definition gw.h:64
double qp_grid_spacing
Definition gw.h:80
double g_sc_limit
Definition gw.h:63
std::string qp_root_finder
Definition gw.h:113
double gw_mixing_alpha
Definition gw.h:94
std::string sigma_integration
Definition gw.h:69
bool qp_root_continuity
Definition gw.h:102
double qp_dense_spacing
Definition gw.h:89
Index qsgw_max_iterations
Definition gw.h:121
bool qp_restrict_search
Definition gw.h:98
std::string qsgw_regularization
Definition gw.h:143
Options of DumpSigma (energies in Hartree unless noted).
Definition gw.h:269
How the RPA energies of levels outside the GW window are shifted.