votca 2026-dev
Loading...
Searching...
No Matches
votca::xtp::GW_UKS Class Reference

#include <gw_uks.h>

Collaboration diagram for votca::xtp::GW_UKS:

Classes

struct  options
class  QPFunc

Public Member Functions

 GW_UKS (Logger &log, TCMatrix_gwbse_spin &Mmn, const Eigen::MatrixXd &vxc_alpha, const Eigen::MatrixXd &vxc_beta, const Eigen::VectorXd &dft_energies_alpha, const Eigen::VectorXd &dft_energies_beta)
void configure (const options &opt)
void CalculateGWPerturbation ()
void setCoreExchange (const Eigen::MatrixXd &alpha, const Eigen::MatrixXd &beta)
 Frozen-core exchange per spin, see GW::setCoreExchange.
void CalculateHQP ()
Eigen::VectorXd getGWAResultsAlpha () const
Eigen::VectorXd getGWAResultsBeta () const
const Eigen::VectorXd & RPAInputEnergiesAlpha () const
const Eigen::VectorXd & RPAInputEnergiesBeta () const
Eigen::MatrixXd getHQPAlpha () const
Eigen::MatrixXd getHQPBeta () const
Eigen::SelfAdjointEigenSolver< Eigen::MatrixXd > DiagonalizeQPHamiltonianAlpha () const
Eigen::SelfAdjointEigenSolver< Eigen::MatrixXd > DiagonalizeQPHamiltonianBeta () const
Index ScreeningBuilds () const
Index QPIterations () const
Index TrackedLocalSolves () const

Private Types

enum class  Spin { Alpha , Beta }
using EvalStage = qp_solver::EvalStage
using QPStats = qp_solver::Stats
using QPRootCandidate = qp_solver::RootCandidate
using QPWindowDiagnostics = qp_solver::WindowDiagnostics

Private Member Functions

const Eigen::VectorXd & DftEnergies (Spin spin) const
const Eigen::MatrixXd & Vxc (Spin spin) const
Eigen::MatrixXd & SigmaX (Spin spin)
Eigen::MatrixXd & SigmaC (Spin spin)
const Eigen::MatrixXd & SigmaX (Spin spin) const
const Eigen::MatrixXd & SigmaC (Spin spin) const
Sigma_base_UKS & SigmaEvaluator (Spin spin)
const Sigma_base_UKS & SigmaEvaluator (Spin spin) const
Index Homo (Spin spin) const
const char * SpinName (Spin spin) const
Eigen::VectorXd ScissorShift_DFTlevel (const Eigen::VectorXd &dft_energies, Index homo) const
double CalcSpinHomoLumoShift (const Eigen::VectorXd &frequencies, Spin spin) const
void PrintGWA_Energies (Spin spin) const
void PrintQP_Energies (Spin spin, const Eigen::VectorXd &qp_diag_energies) const
Eigen::VectorXd SolveQP (Spin spin, const Eigen::VectorXd &frequencies) const
void RecordCompetingRoots (Spin spin, Index gw_level, const std::vector< QPRootCandidate > &roots, double chosen) const
void PrintCompetingRoots (Spin spin, Log::Level level) const
boost::optional< double > SolveQP_Grid (Spin spin, double intercept0, double frequency0, Index gw_level, QPStats *stats=nullptr) const
boost::optional< double > SolveQP_Grid_Windowed (Spin spin, double intercept0, double frequency0, Index gw_level, double left_limit, double right_limit, bool allow_rejected_return=true, QPStats *stats=nullptr) const
boost::optional< double > SolveQP_Grid_Windowed_Adaptive (Spin spin, double intercept0, double frequency0, Index gw_level, double left_limit, double right_limit, bool allow_rejected_return=true, QPStats *stats=nullptr) const
boost::optional< double > SolveQP_Grid_Windowed_Dense (Spin spin, double intercept0, double frequency0, Index gw_level, double left_limit, double right_limit, bool allow_rejected_return=true, QPStats *stats=nullptr) const
boost::optional< double > SolveQP_FixedPoint (Spin spin, double intercept0, double frequency0, Index gw_level, QPStats *stats=nullptr) const
boost::optional< double > SolveQP_Linearisation (Spin spin, double intercept0, double frequency0, Index gw_level, QPStats *stats=nullptr) const
bool Converged (const Eigen::VectorXd &e1, const Eigen::VectorXd &e2, double epsilon) const
boost::optional< QPRootCandidate > RefineQPInterval (double lowerbound, double f_lowerbound, double upperbound, double f_upperbound, const QPFunc &f, double reference) const
std::string LevelLabel (Spin spin, Index level) const
const char * OccupationTag (Spin spin, Index level) const

Private Attributes

PPM ppm_
std::vector< qp_solver::CompetingRoots > competing_roots_ [2]
Eigen::VectorXd tracked_root_ [2]
Eigen::VectorXd tracked_Z_ [2]
Eigen::VectorXd tracked_change_ [2]
bool tracking_active_ = false
Index tracked_local_total_ = 0
Eigen::MatrixXd core_exchange_alpha_
Eigen::MatrixXd core_exchange_beta_
Index screening_builds_ = 0
Index qp_iterations_ = 0
Index qptotal_ = 0
options opt_
Logger & log_
Index gw_sc_iteration_ = 0
TCMatrix_gwbse_spin & Mmn_
const Eigen::MatrixXd & vxc_alpha_
const Eigen::MatrixXd & vxc_beta_
const Eigen::VectorXd & dft_energies_alpha_
const Eigen::VectorXd & dft_energies_beta_
RPA_UKS rpa_
std::unique_ptr< Sigma_base_UKS > sigma_alpha_
std::unique_ptr< Sigma_base_UKS > sigma_beta_
Eigen::MatrixXd Sigma_x_alpha_
Eigen::MatrixXd Sigma_x_beta_
Eigen::MatrixXd Sigma_c_alpha_
Eigen::MatrixXd Sigma_c_beta_

Detailed Description

Definition at line 25 of file gw_uks.h.

Member Typedef Documentation

◆ EvalStage

Definition at line 27 of file gw_uks.h.

◆ QPRootCandidate

Definition at line 29 of file gw_uks.h.

◆ QPStats

Definition at line 28 of file gw_uks.h.

◆ QPWindowDiagnostics

Member Enumeration Documentation

◆ Spin

enum class votca::xtp::GW_UKS::Spin
strongprivate
Enumerator
Alpha 
Beta 

Definition at line 127 of file gw_uks.h.

Constructor & Destructor Documentation

◆ GW_UKS()

votca::xtp::GW_UKS::GW_UKS ( Logger & log,
TCMatrix_gwbse_spin & Mmn,
const Eigen::MatrixXd & vxc_alpha,
const Eigen::MatrixXd & vxc_beta,
const Eigen::VectorXd & dft_energies_alpha,
const Eigen::VectorXd & dft_energies_beta )

Definition at line 28 of file gw_uks.cc.

Member Function Documentation

◆ CalcSpinHomoLumoShift()

double votca::xtp::GW_UKS::CalcSpinHomoLumoShift ( const Eigen::VectorXd & frequencies,
Spin spin ) const
private

Definition at line 182 of file gw_uks.cc.

◆ CalculateGWPerturbation()

void votca::xtp::GW_UKS::CalculateGWPerturbation ( )

Definition at line 192 of file gw_uks.cc.

◆ CalculateHQP()

void votca::xtp::GW_UKS::CalculateHQP ( )

Definition at line 1000 of file gw_uks.cc.

◆ configure()

void votca::xtp::GW_UKS::configure ( const options & opt)

Definition at line 41 of file gw_uks.cc.

◆ Converged()

bool votca::xtp::GW_UKS::Converged ( const Eigen::VectorXd & e1,
const Eigen::VectorXd & e2,
double epsilon ) const
private

Definition at line 991 of file gw_uks.cc.

◆ DftEnergies()

const Eigen::VectorXd & votca::xtp::GW_UKS::DftEnergies ( Spin spin) const
private

Definition at line 129 of file gw_uks.cc.

◆ DiagonalizeQPHamiltonianAlpha()

Eigen::SelfAdjointEigenSolver< Eigen::MatrixXd > votca::xtp::GW_UKS::DiagonalizeQPHamiltonianAlpha ( ) const

Definition at line 1028 of file gw_uks.cc.

◆ DiagonalizeQPHamiltonianBeta()

Eigen::SelfAdjointEigenSolver< Eigen::MatrixXd > votca::xtp::GW_UKS::DiagonalizeQPHamiltonianBeta ( ) const

Definition at line 1035 of file gw_uks.cc.

◆ getGWAResultsAlpha()

Eigen::VectorXd votca::xtp::GW_UKS::getGWAResultsAlpha ( ) const

Definition at line 461 of file gw_uks.cc.

◆ getGWAResultsBeta()

Eigen::VectorXd votca::xtp::GW_UKS::getGWAResultsBeta ( ) const

Definition at line 466 of file gw_uks.cc.

◆ getHQPAlpha()

Eigen::MatrixXd votca::xtp::GW_UKS::getHQPAlpha ( ) const

Definition at line 1016 of file gw_uks.cc.

◆ getHQPBeta()

Eigen::MatrixXd votca::xtp::GW_UKS::getHQPBeta ( ) const

Definition at line 1021 of file gw_uks.cc.

◆ Homo()

Index votca::xtp::GW_UKS::Homo ( Spin spin) const
private

Definition at line 153 of file gw_uks.cc.

◆ LevelLabel()

std::string votca::xtp::GW_UKS::LevelLabel ( Spin spin,
Index level ) const
private

Definition at line 160 of file gw_uks.cc.

◆ OccupationTag()

const char * votca::xtp::GW_UKS::OccupationTag ( Spin spin,
Index level ) const
private

Definition at line 170 of file gw_uks.cc.

◆ PrintCompetingRoots()

void votca::xtp::GW_UKS::PrintCompetingRoots ( Spin spin,
Log::Level level ) const
private

Definition at line 478 of file gw_uks.cc.

◆ PrintGWA_Energies()

void votca::xtp::GW_UKS::PrintGWA_Energies ( Spin spin) const
private

Definition at line 1041 of file gw_uks.cc.

◆ PrintQP_Energies()

void votca::xtp::GW_UKS::PrintQP_Energies ( Spin spin,
const Eigen::VectorXd & qp_diag_energies ) const
private

Definition at line 1081 of file gw_uks.cc.

◆ QPIterations()

Index votca::xtp::GW_UKS::QPIterations ( ) const
inline

Definition at line 123 of file gw_uks.h.

◆ RecordCompetingRoots()

void votca::xtp::GW_UKS::RecordCompetingRoots ( Spin spin,
Index gw_level,
const std::vector< QPRootCandidate > & roots,
double chosen ) const
inlineprivate

Definition at line 262 of file gw_uks.h.

◆ RefineQPInterval()

boost::optional< QPRootCandidate > votca::xtp::GW_UKS::RefineQPInterval ( double lowerbound,
double f_lowerbound,
double upperbound,
double f_upperbound,
const QPFunc & f,
double reference ) const
private

◆ RPAInputEnergiesAlpha()

const Eigen::VectorXd & votca::xtp::GW_UKS::RPAInputEnergiesAlpha ( ) const

Definition at line 471 of file gw_uks.cc.

◆ RPAInputEnergiesBeta()

const Eigen::VectorXd & votca::xtp::GW_UKS::RPAInputEnergiesBeta ( ) const

Definition at line 474 of file gw_uks.cc.

◆ ScissorShift_DFTlevel()

Eigen::VectorXd votca::xtp::GW_UKS::ScissorShift_DFTlevel ( const Eigen::VectorXd & dft_energies,
Index homo ) const
private

Definition at line 174 of file gw_uks.cc.

◆ ScreeningBuilds()

Index votca::xtp::GW_UKS::ScreeningBuilds ( ) const
inline

Of the last evGW run: screening builds, QP iterations (one solve of both spins each) and level solves done by root tracking (locally)

Definition at line 122 of file gw_uks.h.

◆ setCoreExchange()

void votca::xtp::GW_UKS::setCoreExchange ( const Eigen::MatrixXd & alpha,
const Eigen::MatrixXd & beta )
inline

Frozen-core exchange per spin, see GW::setCoreExchange.

Definition at line 103 of file gw_uks.h.

◆ SigmaC() [1/2]

Eigen::MatrixXd & votca::xtp::GW_UKS::SigmaC ( Spin spin)
private

Definition at line 138 of file gw_uks.cc.

◆ SigmaC() [2/2]

const Eigen::MatrixXd & votca::xtp::GW_UKS::SigmaC ( Spin spin) const
private

Definition at line 144 of file gw_uks.cc.

◆ SigmaEvaluator() [1/2]

Sigma_base_UKS & votca::xtp::GW_UKS::SigmaEvaluator ( Spin spin)
private

Definition at line 147 of file gw_uks.cc.

◆ SigmaEvaluator() [2/2]

const Sigma_base_UKS & votca::xtp::GW_UKS::SigmaEvaluator ( Spin spin) const
private

Definition at line 150 of file gw_uks.cc.

◆ SigmaX() [1/2]

Eigen::MatrixXd & votca::xtp::GW_UKS::SigmaX ( Spin spin)
private

Definition at line 135 of file gw_uks.cc.

◆ SigmaX() [2/2]

const Eigen::MatrixXd & votca::xtp::GW_UKS::SigmaX ( Spin spin) const
private

Definition at line 141 of file gw_uks.cc.

◆ SolveQP()

Eigen::VectorXd votca::xtp::GW_UKS::SolveQP ( Spin spin,
const Eigen::VectorXd & frequencies ) const
private

Definition at line 504 of file gw_uks.cc.

◆ SolveQP_FixedPoint()

boost::optional< double > votca::xtp::GW_UKS::SolveQP_FixedPoint ( Spin spin,
double intercept0,
double frequency0,
Index gw_level,
QPStats * stats = nullptr ) const
private

Definition at line 969 of file gw_uks.cc.

◆ SolveQP_Grid()

boost::optional< double > votca::xtp::GW_UKS::SolveQP_Grid ( Spin spin,
double intercept0,
double frequency0,
Index gw_level,
QPStats * stats = nullptr ) const
private

Definition at line 647 of file gw_uks.cc.

◆ SolveQP_Grid_Windowed()

boost::optional< double > votca::xtp::GW_UKS::SolveQP_Grid_Windowed ( Spin spin,
double intercept0,
double frequency0,
Index gw_level,
double left_limit,
double right_limit,
bool allow_rejected_return = true,
QPStats * stats = nullptr ) const
private

Definition at line 913 of file gw_uks.cc.

◆ SolveQP_Grid_Windowed_Adaptive()

boost::optional< double > votca::xtp::GW_UKS::SolveQP_Grid_Windowed_Adaptive ( Spin spin,
double intercept0,
double frequency0,
Index gw_level,
double left_limit,
double right_limit,
bool allow_rejected_return = true,
QPStats * stats = nullptr ) const
private

Definition at line 711 of file gw_uks.cc.

◆ SolveQP_Grid_Windowed_Dense()

boost::optional< double > votca::xtp::GW_UKS::SolveQP_Grid_Windowed_Dense ( Spin spin,
double intercept0,
double frequency0,
Index gw_level,
double left_limit,
double right_limit,
bool allow_rejected_return = true,
QPStats * stats = nullptr ) const
private

Definition at line 791 of file gw_uks.cc.

◆ SolveQP_Linearisation()

boost::optional< double > votca::xtp::GW_UKS::SolveQP_Linearisation ( Spin spin,
double intercept0,
double frequency0,
Index gw_level,
QPStats * stats = nullptr ) const
private

Definition at line 626 of file gw_uks.cc.

◆ SpinName()

const char * votca::xtp::GW_UKS::SpinName ( Spin spin) const
private

Definition at line 156 of file gw_uks.cc.

◆ TrackedLocalSolves()

Index votca::xtp::GW_UKS::TrackedLocalSolves ( ) const
inline

Definition at line 124 of file gw_uks.h.

◆ Vxc()

const Eigen::MatrixXd & votca::xtp::GW_UKS::Vxc ( Spin spin) const
private

Definition at line 132 of file gw_uks.cc.

Member Data Documentation

◆ competing_roots_

std::vector<qp_solver::CompetingRoots> votca::xtp::GW_UKS::competing_roots_[2]
mutableprivate

Definition at line 251 of file gw_uks.h.

◆ core_exchange_alpha_

Eigen::MatrixXd votca::xtp::GW_UKS::core_exchange_alpha_
private

Definition at line 258 of file gw_uks.h.

◆ core_exchange_beta_

Eigen::MatrixXd votca::xtp::GW_UKS::core_exchange_beta_
private

Definition at line 259 of file gw_uks.h.

◆ dft_energies_alpha_

const Eigen::VectorXd& votca::xtp::GW_UKS::dft_energies_alpha_
private

Definition at line 318 of file gw_uks.h.

◆ dft_energies_beta_

const Eigen::VectorXd& votca::xtp::GW_UKS::dft_energies_beta_
private

Definition at line 319 of file gw_uks.h.

◆ gw_sc_iteration_

Index votca::xtp::GW_UKS::gw_sc_iteration_ = 0
private

Definition at line 314 of file gw_uks.h.

◆ log_

Logger& votca::xtp::GW_UKS::log_
private

Definition at line 313 of file gw_uks.h.

◆ Mmn_

TCMatrix_gwbse_spin& votca::xtp::GW_UKS::Mmn_
private

Definition at line 315 of file gw_uks.h.

◆ opt_

options votca::xtp::GW_UKS::opt_
private

Definition at line 312 of file gw_uks.h.

◆ ppm_

PPM votca::xtp::GW_UKS::ppm_
private

Definition at line 229 of file gw_uks.h.

◆ qp_iterations_

Index votca::xtp::GW_UKS::qp_iterations_ = 0
private

Definition at line 261 of file gw_uks.h.

◆ qptotal_

Index votca::xtp::GW_UKS::qptotal_ = 0
private

Definition at line 311 of file gw_uks.h.

◆ rpa_

RPA_UKS votca::xtp::GW_UKS::rpa_
private

Definition at line 320 of file gw_uks.h.

◆ screening_builds_

Index votca::xtp::GW_UKS::screening_builds_ = 0
private

Definition at line 260 of file gw_uks.h.

◆ sigma_alpha_

std::unique_ptr<Sigma_base_UKS> votca::xtp::GW_UKS::sigma_alpha_
private

Definition at line 321 of file gw_uks.h.

◆ sigma_beta_

std::unique_ptr<Sigma_base_UKS> votca::xtp::GW_UKS::sigma_beta_
private

Definition at line 322 of file gw_uks.h.

◆ Sigma_c_alpha_

Eigen::MatrixXd votca::xtp::GW_UKS::Sigma_c_alpha_
private

Definition at line 325 of file gw_uks.h.

◆ Sigma_c_beta_

Eigen::MatrixXd votca::xtp::GW_UKS::Sigma_c_beta_
private

Definition at line 326 of file gw_uks.h.

◆ Sigma_x_alpha_

Eigen::MatrixXd votca::xtp::GW_UKS::Sigma_x_alpha_
private

Definition at line 323 of file gw_uks.h.

◆ Sigma_x_beta_

Eigen::MatrixXd votca::xtp::GW_UKS::Sigma_x_beta_
private

Definition at line 324 of file gw_uks.h.

◆ tracked_change_

Eigen::VectorXd votca::xtp::GW_UKS::tracked_change_[2]
mutableprivate

Definition at line 255 of file gw_uks.h.

◆ tracked_local_total_

Index votca::xtp::GW_UKS::tracked_local_total_ = 0
mutableprivate

Definition at line 257 of file gw_uks.h.

◆ tracked_root_

Eigen::VectorXd votca::xtp::GW_UKS::tracked_root_[2]
mutableprivate

Definition at line 253 of file gw_uks.h.

◆ tracked_Z_

Eigen::VectorXd votca::xtp::GW_UKS::tracked_Z_[2]
mutableprivate

Definition at line 254 of file gw_uks.h.

◆ tracking_active_

bool votca::xtp::GW_UKS::tracking_active_ = false
mutableprivate

Definition at line 256 of file gw_uks.h.

◆ vxc_alpha_

const Eigen::MatrixXd& votca::xtp::GW_UKS::vxc_alpha_
private

Definition at line 316 of file gw_uks.h.

◆ vxc_beta_

const Eigen::MatrixXd& votca::xtp::GW_UKS::vxc_beta_
private

Definition at line 317 of file gw_uks.h.


The documentation for this class was generated from the following files: