|
votca 2026-dev
|
#include <sigma_base.h>


Classes | |
| struct | options |
| struct | DiagPoleForm |
| struct | ScreeningData |
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 | CalcHartreeMatrix (const Eigen::MatrixXd &R=Eigen::MatrixXd()) 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 |
| Eigen::MatrixXd | CalcCorrelationSRG (const Eigen::VectorXd &frequencies, double s) 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 bool | HasPoleForm () const |
| virtual DiagPoleForm | PoleForm (Index gw_level) const |
| void | setKeepScreeningData (bool keep) |
| virtual ScreeningData | ScreeningDump (const Eigen::VectorXd &nu) const |
| 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 |
Static Protected Member Functions | |
| static void | FrameSums (const Eigen::MatrixXd &a, const Eigen::VectorXd &omegas, const Eigen::VectorXd &nu, ScreeningData &data) |
Protected Attributes | |
| options | opt_ |
| TCMatrix_gwbse & | Mmn_ |
| const RPA & | rpa_ |
| DFTTimings * | timings_ = nullptr |
| Index | qptotal_ = 0 |
| Index | rpatotal_ = 0 |
| bool | keep_screening_data_ = false |
Private Attributes | |
| double | block_bytes_ = 4e9 |
| double | chunk_bytes_ = 5e8 |
| std::atomic< std::size_t > | diag_eval_counter_ {0} |
Definition at line 38 of file sigma_base.h.
|
inline |
Definition at line 40 of file sigma_base.h.
|
virtualdefault |
| Eigen::VectorXd votca::xtp::Sigma_base::CalcCorrelationDiag | ( | const Eigen::VectorXd & | frequencies | ) | const |
Definition at line 194 of file sigma_base.cc.
|
pure virtual |
Implemented in votca::xtp::Sigma_CDA, votca::xtp::Sigma_Exact, and votca::xtp::Sigma_PPM.
|
pure virtual |
Implemented in votca::xtp::Sigma_CDA, votca::xtp::Sigma_Exact, and votca::xtp::Sigma_PPM.
|
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 179 of file sigma_base.h.
|
virtual |
Reimplemented in votca::xtp::Sigma_Exact, and votca::xtp::Sigma_PPM.
Definition at line 267 of file sigma_base.cc.
|
pure virtual |
Implemented in votca::xtp::Sigma_CDA, votca::xtp::Sigma_Exact, and votca::xtp::Sigma_PPM.
| Eigen::MatrixXd votca::xtp::Sigma_base::CalcCorrelationSRG | ( | const Eigen::VectorXd & | frequencies, |
| double | s ) const |
Static correlation self-energy of SRG-regularized QSGW (Marie and Loos, arXiv:2303.05984, eq. 44), diagonal and off-diagonal, from the pole form (exact and ppm): with D_n(p) = w_n - z_p, S_n1n2 = prefactor sum_p c_p r_n1(p) r_n2(p) (D1 + D2) / (D1^2 + D2^2) [1 - exp(-s (D1^2 + D2^2))], on the diagonal (1 - exp(-2 s D^2)) / D. Hermitian without symmetrisation; s -> infinity gives the eta -> 0 limit of the symmetrised form on the diagonal. Throws without a pole form.
Definition at line 205 of file sigma_base.cc.
| Eigen::MatrixXd votca::xtp::Sigma_base::CalcExchangeMatrix | ( | ) | const |
Definition at line 118 of file sigma_base.cc.
| Eigen::MatrixXd votca::xtp::Sigma_base::CalcHartreeMatrix | ( | const Eigen::MatrixXd & | R = Eigen::MatrixXd() | ) | const |
Hartree matrix of the active occupied levels (rpamin..homo) in the QP window, in the current orbitals of the integrals: J_mn = 2 sum_{i occ} (mn|ii) = 2 sum_PQ M_mn,P v_PQ d_Q, d = sum_{i occ} M_ii (the frozen core below rpamin is not included). QSGW uses the change of J between the DFT and the QP orbitals.
Without R the interaction is the bare v. With R, the reaction field of a static environment in the FILL-TIME auxiliary frame (as for CalcReactionFieldMatrix), it is u = v + v_reac, i.e. the kernel 1 + R: J^u_mn = 2 sum_PQ M_mn,P (1 + R)_PQ d_Q, which adds the potential of the dipoles the environment induces in response to the density. Both are evaluated in whatever frame the integrals are in now (rotated, dressed or not).
Definition at line 143 of file sigma_base.cc.
| 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 180 of file sigma_base.cc.
|
inline |
Definition at line 56 of file sigma_base.h.
|
inlineprotected |
Definition at line 221 of file sigma_base.h.
|
staticprotected |
ScreeningData from modes a_is given as (phi^T Z)^2-like weights: fills frame_moments and frame_eps_inv_imag from the weights a (frame x modes) and the mode frequencies.
Definition at line 98 of file sigma_base.cc.
|
inline |
Definition at line 203 of file sigma_base.h.
|
inlinevirtual |
False if CalcCorrelationOffDiag only returns zeros (CDA).
Reimplemented in votca::xtp::Sigma_CDA.
Definition at line 133 of file sigma_base.h.
|
inlinevirtual |
Reimplemented in votca::xtp::Sigma_Exact, and votca::xtp::Sigma_PPM.
Definition at line 148 of file sigma_base.h.
|
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 41 of file sigma_base.cc.
|
virtual |
Reimplemented in votca::xtp::Sigma_Exact, and votca::xtp::Sigma_PPM.
Definition at line 86 of file sigma_base.cc.
|
pure virtual |
Implemented in votca::xtp::Sigma_CDA, votca::xtp::Sigma_Exact, and votca::xtp::Sigma_PPM.
|
inline |
Definition at line 202 of file sigma_base.h.
|
virtual |
Reimplemented in votca::xtp::Sigma_Exact, and votca::xtp::Sigma_PPM.
Definition at line 92 of file sigma_base.cc.
|
inlinevirtual |
One line about the screening just prepared (empty if nothing to say).
Reimplemented in votca::xtp::Sigma_PPM.
Definition at line 131 of file sigma_base.h.
|
inline |
Keep what ScreeningDump needs from the next PrepareScreening on (the exact evaluator then keeps the aux x modes array Z).
Definition at line 169 of file sigma_base.h.
|
inline |
Memory (bytes) for the level block and the integral chunk of PairContraction; smaller values only mean more passes.
Definition at line 194 of file sigma_base.h.
|
inline |
Times the parts of PrepareScreening in these timings (optional).
Definition at line 200 of file sigma_base.h.
|
private |
Definition at line 233 of file sigma_base.h.
|
private |
Definition at line 234 of file sigma_base.h.
|
mutableprivate |
Definition at line 235 of file sigma_base.h.
|
protected |
Definition at line 213 of file sigma_base.h.
|
protected |
Definition at line 207 of file sigma_base.h.
|
protected |
Definition at line 206 of file sigma_base.h.
|
protected |
Definition at line 211 of file sigma_base.h.
|
protected |
Definition at line 208 of file sigma_base.h.
|
protected |
Definition at line 212 of file sigma_base.h.
|
protected |
Definition at line 209 of file sigma_base.h.