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