votca 2026-dev
Loading...
Searching...
No Matches
votca::xtp::Sigma_base Class Referenceabstract

#include <sigma_base.h>

Inheritance diagram for votca::xtp::Sigma_base:
Collaboration diagram for votca::xtp::Sigma_base:

Classes

struct  options

Public Member Functions

 Sigma_base (TCMatrix_gwbse &Mmn, const RPA &rpa)
virtual ~Sigma_base ()=default
void configure (options opt)
Eigen::MatrixXd CalcExchangeMatrix () const
Eigen::MatrixXd CalcReactionFieldMatrix (const Eigen::MatrixXd &R) const
 Static self-energy of an environment reaction field: the COH+SEX pair for v_reac, in the QP window.
Eigen::VectorXd CalcCorrelationDiag (const Eigen::VectorXd &frequencies) const
virtual Eigen::MatrixXd CalcCorrelationOffDiag (const Eigen::VectorXd &frequencies) const
virtual void PrepareScreening ()=0
virtual std::string ScreeningSummary () const
 One line about the screening just prepared (empty if nothing to say).
virtual bool HasOffDiagonal () const
 False if CalcCorrelationOffDiag only returns zeros (CDA).
virtual double CalcCorrelationDiagElementDerivative (Index gw_level, double frequency) const =0
virtual double CalcCorrelationDiagElement (Index gw_level, double frequency) const =0
virtual Eigen::VectorXd CalcCorrelationDiagElements (Index gw_level, const Eigen::VectorXd &frequencies) const
virtual double CalcCorrelationOffDiagElement (Index gw_level1, Index gw_level2, double frequency1, double frequency2) const =0
void setPairContractionMemory (double block_bytes, double chunk_bytes)
void setTimings (DFTTimings *timings)
 Times the parts of PrepareScreening in these timings (optional).
void ResetDiagEvalCounter () const
std::size_t GetDiagEvalCounter () const

Protected Member Functions

void CountDiagEval () const
Eigen::MatrixXd PairContraction (Index nrows, const std::function< void(Index, Eigen::MatrixXd &)> &makeX) const

Protected Attributes

options opt_
TCMatrix_gwbse & Mmn_
const RPA & rpa_
DFTTimings * timings_ = nullptr
Index qptotal_ = 0
Index rpatotal_ = 0

Private Attributes

double block_bytes_ = 4e9
double chunk_bytes_ = 5e8
std::atomic< std::size_t > diag_eval_counter_ {0}

Detailed Description

Definition at line 37 of file sigma_base.h.

Constructor & Destructor Documentation

◆ Sigma_base()

votca::xtp::Sigma_base::Sigma_base ( TCMatrix_gwbse & Mmn,
const RPA & rpa )
inline

Definition at line 39 of file sigma_base.h.

◆ ~Sigma_base()

virtual votca::xtp::Sigma_base::~Sigma_base ( )
virtualdefault

Member Function Documentation

◆ CalcCorrelationDiag()

Eigen::VectorXd votca::xtp::Sigma_base::CalcCorrelationDiag ( const Eigen::VectorXd & frequencies) const

Definition at line 123 of file sigma_base.cc.

◆ CalcCorrelationDiagElement()

virtual double votca::xtp::Sigma_base::CalcCorrelationDiagElement ( Index gw_level,
double frequency ) const
pure virtual

◆ CalcCorrelationDiagElementDerivative()

virtual double votca::xtp::Sigma_base::CalcCorrelationDiagElementDerivative ( Index gw_level,
double frequency ) const
pure virtual

◆ CalcCorrelationDiagElements()

virtual Eigen::VectorXd votca::xtp::Sigma_base::CalcCorrelationDiagElements ( Index gw_level,
const Eigen::VectorXd & frequencies ) const
inlinevirtual

Diagonal element at several frequencies. The default evaluates them one by one; implementations may do all of them in one pass over the integrals.

Reimplemented in votca::xtp::Sigma_Exact, and votca::xtp::Sigma_PPM.

Definition at line 114 of file sigma_base.h.

◆ CalcCorrelationOffDiag()

Eigen::MatrixXd votca::xtp::Sigma_base::CalcCorrelationOffDiag ( const Eigen::VectorXd & frequencies) const
virtual

Reimplemented in votca::xtp::Sigma_Exact, and votca::xtp::Sigma_PPM.

Definition at line 134 of file sigma_base.cc.

◆ CalcCorrelationOffDiagElement()

virtual double votca::xtp::Sigma_base::CalcCorrelationOffDiagElement ( Index gw_level1,
Index gw_level2,
double frequency1,
double frequency2 ) const
pure virtual

◆ CalcExchangeMatrix()

Eigen::MatrixXd votca::xtp::Sigma_base::CalcExchangeMatrix ( ) const

Definition at line 84 of file sigma_base.cc.

◆ CalcReactionFieldMatrix()

Eigen::MatrixXd votca::xtp::Sigma_base::CalcReactionFieldMatrix ( const Eigen::MatrixXd & R) const

Static self-energy of an environment reaction field: the COH+SEX pair for v_reac, in the QP window.

With the reaction field v_reac = v_12 chi^(2) v_21 of a static environment folded into the screened interaction, W = W_dyn + v_reac, and the frequency-independent part contributes

Sigma^SEX_nn' = - sum_{i occ} (ni|v_reac|n'i) Sigma^COH_nn' = 1/2 sum_{m} (nm|v_reac|n'm)

Sigma^reac_nn' = 1/2 sum_m s_m (nm|v_reac|n'm), s_m = -1 occ, +1 virt,

with (nm|v_reac|n'm) = M_nm R M_n'm^T. SEX alone would move the HOMO by twice the polarization energy and leave the LUMO where it is; with COH a level of density psi_n^2 moves by -+ 1/2 (nn|v_reac|nn): occupied levels up, virtual ones down, which is the familiar P_h + P_e gap closing of a polarizable environment.

The m-sum runs over the RPA window. COH needs it complete – it is a closure relation – so with rpamax below the last MO the result is truncated. v_reac is smooth over the molecule, so that converges fast, but it is not exact.

R must be in the FILL-TIME auxiliary frame, R = T^T B T as EnvironmentScreening::SymmetrizedReactionField returns it; it is brought into the frame of the integrals here.

Definition at line 109 of file sigma_base.cc.

◆ configure()

void votca::xtp::Sigma_base::configure ( options opt)
inline

Definition at line 55 of file sigma_base.h.

◆ CountDiagEval()

void votca::xtp::Sigma_base::CountDiagEval ( ) const
inlineprotected

Definition at line 149 of file sigma_base.h.

◆ GetDiagEvalCounter()

std::size_t votca::xtp::Sigma_base::GetDiagEvalCounter ( ) const
inline

Definition at line 138 of file sigma_base.h.

◆ HasOffDiagonal()

virtual bool votca::xtp::Sigma_base::HasOffDiagonal ( ) const
inlinevirtual

False if CalcCorrelationOffDiag only returns zeros (CDA).

Reimplemented in votca::xtp::Sigma_CDA.

Definition at line 105 of file sigma_base.h.

◆ PairContraction()

Eigen::MatrixXd votca::xtp::Sigma_base::PairContraction ( Index nrows,
const std::function< void(Index, Eigen::MatrixXd &)> & makeX ) const
protected

A(m,n) = sum_{l < nrows, P} X_m(l,P) M_n(l,P) for all pairs of QP levels m, n, with M_n = Mmn_[n] (QP-window numbering) and X_m from makeX(m, X) (nrows x auxsize). Evaluated as matrix products over blocks of m and chunks of the auxiliary index, so the three-centre integrals are streamed a few times instead of once per pair.

Definition at line 39 of file sigma_base.cc.

◆ PrepareScreening()

virtual void votca::xtp::Sigma_base::PrepareScreening ( )
pure virtual

◆ ResetDiagEvalCounter()

void votca::xtp::Sigma_base::ResetDiagEvalCounter ( ) const
inline

Definition at line 137 of file sigma_base.h.

◆ ScreeningSummary()

virtual std::string votca::xtp::Sigma_base::ScreeningSummary ( ) const
inlinevirtual

One line about the screening just prepared (empty if nothing to say).

Reimplemented in votca::xtp::Sigma_PPM.

Definition at line 103 of file sigma_base.h.

◆ setPairContractionMemory()

void votca::xtp::Sigma_base::setPairContractionMemory ( double block_bytes,
double chunk_bytes )
inline

Memory (bytes) for the level block and the integral chunk of PairContraction; smaller values only mean more passes.

Definition at line 129 of file sigma_base.h.

◆ setTimings()

void votca::xtp::Sigma_base::setTimings ( DFTTimings * timings)
inline

Times the parts of PrepareScreening in these timings (optional).

Definition at line 135 of file sigma_base.h.

Member Data Documentation

◆ block_bytes_

double votca::xtp::Sigma_base::block_bytes_ = 4e9
private

Definition at line 161 of file sigma_base.h.

◆ chunk_bytes_

double votca::xtp::Sigma_base::chunk_bytes_ = 5e8
private

Definition at line 162 of file sigma_base.h.

◆ diag_eval_counter_

std::atomic<std::size_t> votca::xtp::Sigma_base::diag_eval_counter_ {0}
mutableprivate

Definition at line 163 of file sigma_base.h.

◆ Mmn_

TCMatrix_gwbse& votca::xtp::Sigma_base::Mmn_
protected

Definition at line 142 of file sigma_base.h.

◆ opt_

options votca::xtp::Sigma_base::opt_
protected

Definition at line 141 of file sigma_base.h.

◆ qptotal_

Index votca::xtp::Sigma_base::qptotal_ = 0
protected

Definition at line 146 of file sigma_base.h.

◆ rpa_

const RPA& votca::xtp::Sigma_base::rpa_
protected

Definition at line 143 of file sigma_base.h.

◆ rpatotal_

Index votca::xtp::Sigma_base::rpatotal_ = 0
protected

Definition at line 147 of file sigma_base.h.

◆ timings_

DFTTimings* votca::xtp::Sigma_base::timings_ = nullptr
protected

Definition at line 144 of file sigma_base.h.


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