votca 2026-dev
Loading...
Searching...
No Matches
votca::xtp::OutOfWindowShift Struct Reference

How the RPA energies of levels outside the GW window are shifted. More...

#include <out_of_window_shift.h>

Public Types

enum class  Mode { Max , Nearest , Linear }

Public Member Functions

void Apply (Eigen::VectorXd &energies, const Eigen::VectorXd &dft, Index rpamin, Index rpamax, Index homo, Index qpmin, Index qpmax) const

Static Public Member Functions

static Mode Parse (const std::string &name)
static std::string Name (Mode mode)

Public Attributes

Mode mode = Mode::Max
double fit_fraction = 0.3

Private Member Functions

void ShiftSide (Eigen::VectorXd &energies, const Eigen::VectorXd &dft, Index rpamin, Index out_first, Index out_last, Index win_first, Index win_last, bool below) const

Detailed Description

How the RPA energies of levels outside the GW window are shifted.

Levels in the RPA but not in the GW window [qpmin, qpmax] get no QP correction of their own. With D_i = E_i - e_i the corrections of the window levels, occupied (below qpmin) and virtual (above qpmax) levels are shifted by

  • max: the largest |D_i| of the occupied (virtual) window levels, downwards (upwards), one rigid shift per side;
  • nearest: D at the window boundary (qpmin, qpmax), with its sign;
  • linear: D(e) = a + b (e - e_b) from a least-squares fit of D_i against e_i over the fraction fit_fraction of the occupied (virtual) window levels next to the boundary e_b; it is extrapolated at most as far beyond the boundary as the fitted levels span, and is constant beyond that.

nearest and linear are smooth functions of the QP energies; max is not (which level holds the maximum changes), which matters for the fixed-point iterations of evGW and QSGW.

Definition at line 57 of file out_of_window_shift.h.

Member Enumeration Documentation

◆ Mode

Enumerator
Max 
Nearest 
Linear 

Definition at line 58 of file out_of_window_shift.h.

Member Function Documentation

◆ Apply()

void votca::xtp::OutOfWindowShift::Apply ( Eigen::VectorXd & energies,
const Eigen::VectorXd & dft,
Index rpamin,
Index rpamax,
Index homo,
Index qpmin,
Index qpmax ) const
inline

Shifts the levels outside [qpmin, qpmax] of energies (indexed from rpamin, window levels already QP energies); dft and the level numbers homo, qpmin, qpmax are absolute.

Definition at line 87 of file out_of_window_shift.h.

◆ Name()

std::string votca::xtp::OutOfWindowShift::Name ( Mode mode)
inlinestatic

Definition at line 73 of file out_of_window_shift.h.

◆ Parse()

Mode votca::xtp::OutOfWindowShift::Parse ( const std::string & name)
inlinestatic

Definition at line 62 of file out_of_window_shift.h.

◆ ShiftSide()

void votca::xtp::OutOfWindowShift::ShiftSide ( Eigen::VectorXd & energies,
const Eigen::VectorXd & dft,
Index rpamin,
Index out_first,
Index out_last,
Index win_first,
Index win_last,
bool below ) const
inlineprivate

Definition at line 106 of file out_of_window_shift.h.

Member Data Documentation

◆ fit_fraction

double votca::xtp::OutOfWindowShift::fit_fraction = 0.3

Definition at line 60 of file out_of_window_shift.h.

◆ mode

Mode votca::xtp::OutOfWindowShift::mode = Mode::Max

Definition at line 59 of file out_of_window_shift.h.


The documentation for this struct was generated from the following file: