votca 2026-dev
Loading...
Searching...
No Matches
votca::xtp::TCMatrix_gwbse Class Referencefinal

#include <threecenter.h>

Inheritance diagram for votca::xtp::TCMatrix_gwbse:
Collaboration diagram for votca::xtp::TCMatrix_gwbse:

Public Member Functions

const Eigen::MatrixXd & operator[] (Index i) const
Eigen::MatrixXd & operator[] (Index i)
Index auxsize () const
Index get_mmin () const
Index get_mmax () const
Index get_nmin () const
Index get_nmax () const
Index msize () const
Index nsize () const
void Initialize (Index basissize, Index mmin, Index mmax, Index nmin, Index nmax)
void Fill (const AOBasis &auxbasis, const AOBasis &dftbasis, const Eigen::MatrixXd &dft_orbitals)
void Rebuild ()
void MultiplyRightWithAuxMatrix (const Eigen::MatrixXd &matrix)
void MultiplyRightWithAuxMatrixLeading (const Eigen::MatrixXd &U, Index full_slices, Index lead)
 Rotate the auxiliary index of only the part of the tensor a consumer reads: all rows of slices [0, full_slices) and the first lead rows of slices [full_slices, lead).
bool PartiallyRotated () const
 Whether only a leading part was rotated since the last Fill.
const Eigen::MatrixXd & InvSqrt () const
const Eigen::MatrixXd & AuxFrame () const
void RestoreAuxFrame (const Eigen::MatrixXd &frame)
Eigen::MatrixXd ToCurrentAuxFrame (const Eigen::MatrixXd &K) const
bool AuxFrameIsOrthogonal () const
void DressAuxIndex (const Eigen::MatrixXd &S)
 Dress the auxiliary index with S: M_fill -> M_fill S.
void UndressAuxIndex ()
bool Dressed () const
void RotateOrbitals (const Eigen::MatrixXd &U, Index first, Index last)
 Change the orbital basis of levels [first, last] for QSGW: phi_i = sum_k U_ki psi_k, both orbital indices, all slices.
Public Member Functions inherited from votca::xtp::TCMatrix
 TCMatrix ()=default
virtual ~TCMatrix ()=default
 TCMatrix (const TCMatrix &)=default
 TCMatrix (TCMatrix &&)=default
TCMatrix & operator= (const TCMatrix &)=default
TCMatrix & operator= (TCMatrix &&)=default
Index Removedfunctions () const

Static Public Member Functions

static Eigen::MatrixXd CoreExchange (const AOBasis &auxbasis, const AOBasis &dftbasis, const Eigen::MatrixXd &mos, Index ncore, Index qpmin, Index qpmax)

Static Public Attributes

static constexpr double metric_tolerance = 5e-7

Private Member Functions

void MultiplyInFillFrame (const Eigen::MatrixXd &A)
void Fill3cMO (const AOBasis &auxbasis, const AOBasis &dftbasis, const Eigen::MatrixXd &dft_orbitals)

Private Attributes

std::vector< Eigen::MatrixXd > matrix_
Index mmin_
Index mmax_
Index nmin_
Index nmax_
Index ntotal_
Index mtotal_
Index auxbasissize_
Eigen::MatrixXd aux_frame_
bool aux_frame_known_ = true
bool partially_rotated_ = false
Eigen::MatrixXd dressing_
const AOBasis * auxbasis_ = nullptr
const AOBasis * dftbasis_ = nullptr
const Eigen::MatrixXd * dft_orbitals_ = nullptr

Additional Inherited Members

Public Types inherited from votca::xtp::TCMatrix
enum class  SpinChannel { Alpha , Beta }
Protected Attributes inherited from votca::xtp::TCMatrix
Index removedfunctions_ = 0
Eigen::MatrixXd inv_sqrt_

Detailed Description

Definition at line 143 of file threecenter.h.

Member Function Documentation

◆ AuxFrame()

const Eigen::MatrixXd & votca::xtp::TCMatrix_gwbse::AuxFrame ( ) const
inline

Definition at line 238 of file threecenter.h.

◆ AuxFrameIsOrthogonal()

bool votca::xtp::TCMatrix_gwbse::AuxFrameIsOrthogonal ( ) const

Definition at line 121 of file threecenter.cc.

◆ auxsize()

Index votca::xtp::TCMatrix_gwbse::auxsize ( ) const
inline

Definition at line 156 of file threecenter.h.

◆ CoreExchange()

Eigen::MatrixXd votca::xtp::TCMatrix_gwbse::CoreExchange ( const AOBasis & auxbasis,
const AOBasis & dftbasis,
const Eigen::MatrixXd & mos,
Index ncore,
Index qpmin,
Index qpmax )
static

Exchange with the occupied levels 0..ncore-1 for the levels qpmin..qpmax of these MOs, with the bare Coulomb interaction: X(m,n) = - sum_{c < ncore} (m c | c n), from (m c | P) integrals filled for this purpose only. For frozen-core GW (rpamin = ncore > 0), whose Mmn has no rows for the core levels.

Definition at line 34 of file threecenter.cc.

◆ DressAuxIndex()

void votca::xtp::TCMatrix_gwbse::DressAuxIndex ( const Eigen::MatrixXd & S)

Dress the auxiliary index with S: M_fill -> M_fill S.

For a static environment the QM electrons interact through u = v + v_reac, which is 1 + R in the metric of M, and the screened interaction is W = [u^-1 - chi0]^-1. With S = (1 + R)^(1/2), that is exactly the ordinary RPA and correlation self-energy built from M S in place of M: every place that pairs two M's through the bare interaction pairs them through u instead.

S is in the fill-time frame, and is applied in whatever frame the integrals are in now; AuxFrame() records it, so ToCurrentAuxFrame still maps fill-time kernels correctly. Exchange-type sums that must keep the bare v take ToCurrentAuxFrame(identity) as their kernel once the frame is no longer orthogonal (see AuxFrameIsOrthogonal).

Throws if already dressed. Fill and Rebuild undress.

Definition at line 155 of file threecenter.cc.

◆ Dressed()

bool votca::xtp::TCMatrix_gwbse::Dressed ( ) const
inline

Definition at line 280 of file threecenter.h.

◆ Fill()

void votca::xtp::TCMatrix_gwbse::Fill ( const AOBasis & auxbasis,
const AOBasis & dftbasis,
const Eigen::MatrixXd & dft_orbitals )

Definition at line 218 of file threecenter.cc.

◆ Fill3cMO()

void votca::xtp::TCMatrix_gwbse::Fill3cMO ( const AOBasis & auxbasis,
const AOBasis & dftbasis,
const Eigen::MatrixXd & dft_orbitals )
private

Definition at line 828 of file libint2_calls.cc.

◆ get_mmax()

Index votca::xtp::TCMatrix_gwbse::get_mmax ( ) const
inline

Definition at line 160 of file threecenter.h.

◆ get_mmin()

Index votca::xtp::TCMatrix_gwbse::get_mmin ( ) const
inline

Definition at line 158 of file threecenter.h.

◆ get_nmax()

Index votca::xtp::TCMatrix_gwbse::get_nmax ( ) const
inline

Definition at line 164 of file threecenter.h.

◆ get_nmin()

Index votca::xtp::TCMatrix_gwbse::get_nmin ( ) const
inline

Definition at line 162 of file threecenter.h.

◆ Initialize()

void votca::xtp::TCMatrix_gwbse::Initialize ( Index basissize,
Index mmin,
Index mmax,
Index nmin,
Index nmax )

Definition at line 59 of file threecenter.cc.

◆ InvSqrt()

const Eigen::MatrixXd & votca::xtp::TCMatrix_gwbse::InvSqrt ( ) const
inline

Definition at line 226 of file threecenter.h.

◆ msize()

Index votca::xtp::TCMatrix_gwbse::msize ( ) const
inline

Definition at line 166 of file threecenter.h.

◆ MultiplyInFillFrame()

void votca::xtp::TCMatrix_gwbse::MultiplyInFillFrame ( const Eigen::MatrixXd & A)
private

Definition at line 134 of file threecenter.cc.

◆ MultiplyRightWithAuxMatrix()

void votca::xtp::TCMatrix_gwbse::MultiplyRightWithAuxMatrix ( const Eigen::MatrixXd & matrix)

Definition at line 84 of file threecenter.cc.

◆ MultiplyRightWithAuxMatrixLeading()

void votca::xtp::TCMatrix_gwbse::MultiplyRightWithAuxMatrixLeading ( const Eigen::MatrixXd & U,
Index full_slices,
Index lead )

Rotate the auxiliary index of only the part of the tensor a consumer reads: all rows of slices [0, full_slices) and the first lead rows of slices [full_slices, lead).

The BSE reads slices and rows up to its highest conduction level (lead) and, for the dielectric matrix, all rows of the occupied slices (full_slices). Rotating only those is exact for that use and skips the rows above the BSE window. The rest of the tensor is left in the old frame and is stale afterwards: AuxFrame() describes the rotated part, and dressing, which needs the whole tensor in one frame, throws until the next Fill or Rebuild.

Definition at line 97 of file threecenter.cc.

◆ nsize()

Index votca::xtp::TCMatrix_gwbse::nsize ( ) const
inline

Definition at line 168 of file threecenter.h.

◆ operator[]() [1/2]

Eigen::MatrixXd & votca::xtp::TCMatrix_gwbse::operator[] ( Index i)
inline

Definition at line 154 of file threecenter.h.

◆ operator[]() [2/2]

const Eigen::MatrixXd & votca::xtp::TCMatrix_gwbse::operator[] ( Index i) const
inline

Definition at line 151 of file threecenter.h.

◆ PartiallyRotated()

bool votca::xtp::TCMatrix_gwbse::PartiallyRotated ( ) const
inline

Whether only a leading part was rotated since the last Fill.

Definition at line 207 of file threecenter.h.

◆ Rebuild()

void votca::xtp::TCMatrix_gwbse::Rebuild ( )
inline

Definition at line 187 of file threecenter.h.

◆ RestoreAuxFrame()

void votca::xtp::TCMatrix_gwbse::RestoreAuxFrame ( const Eigen::MatrixXd & frame)
inline

Definition at line 243 of file threecenter.h.

◆ RotateOrbitals()

void votca::xtp::TCMatrix_gwbse::RotateOrbitals ( const Eigen::MatrixXd & U,
Index first,
Index last )

Change the orbital basis of levels [first, last] for QSGW: phi_i = sum_k U_ki psi_k, both orbital indices, all slices.

rows n in the window of every slice: M[m].rows <- U^T M[m].rows slices in the window: M[i] <- sum_k U_ki M[k]

Levels outside the window keep their orbitals. Everything that reads the tensor (RPA, self-energy, exchange) then works in the new basis without knowing about U. The auxiliary index is not touched.

Parameters
URotation matrix (window x window), columns = new orbitals
firstFirst level of the window (absolute MO index)
lastLast level of the window (absolute MO index)

Definition at line 243 of file threecenter.cc.

◆ ToCurrentAuxFrame()

Eigen::MatrixXd votca::xtp::TCMatrix_gwbse::ToCurrentAuxFrame ( const Eigen::MatrixXd & K) const

Definition at line 178 of file threecenter.cc.

◆ UndressAuxIndex()

void votca::xtp::TCMatrix_gwbse::UndressAuxIndex ( )

Definition at line 170 of file threecenter.cc.

Member Data Documentation

◆ aux_frame_

Eigen::MatrixXd votca::xtp::TCMatrix_gwbse::aux_frame_
private

Definition at line 312 of file threecenter.h.

◆ aux_frame_known_

bool votca::xtp::TCMatrix_gwbse::aux_frame_known_ = true
private

Definition at line 313 of file threecenter.h.

◆ auxbasis_

const AOBasis* votca::xtp::TCMatrix_gwbse::auxbasis_ = nullptr
private

Definition at line 320 of file threecenter.h.

◆ auxbasissize_

Index votca::xtp::TCMatrix_gwbse::auxbasissize_
private

Definition at line 310 of file threecenter.h.

◆ dft_orbitals_

const Eigen::MatrixXd* votca::xtp::TCMatrix_gwbse::dft_orbitals_ = nullptr
private

Definition at line 322 of file threecenter.h.

◆ dftbasis_

const AOBasis* votca::xtp::TCMatrix_gwbse::dftbasis_ = nullptr
private

Definition at line 321 of file threecenter.h.

◆ dressing_

Eigen::MatrixXd votca::xtp::TCMatrix_gwbse::dressing_
private

Definition at line 315 of file threecenter.h.

◆ matrix_

std::vector<Eigen::MatrixXd> votca::xtp::TCMatrix_gwbse::matrix_
private

Definition at line 301 of file threecenter.h.

◆ metric_tolerance

double votca::xtp::TCMatrix_gwbse::metric_tolerance = 5e-7
staticconstexpr

Definition at line 148 of file threecenter.h.

◆ mmax_

Index votca::xtp::TCMatrix_gwbse::mmax_
private

Definition at line 305 of file threecenter.h.

◆ mmin_

Index votca::xtp::TCMatrix_gwbse::mmin_
private

Definition at line 304 of file threecenter.h.

◆ mtotal_

Index votca::xtp::TCMatrix_gwbse::mtotal_
private

Definition at line 309 of file threecenter.h.

◆ nmax_

Index votca::xtp::TCMatrix_gwbse::nmax_
private

Definition at line 307 of file threecenter.h.

◆ nmin_

Index votca::xtp::TCMatrix_gwbse::nmin_
private

Definition at line 306 of file threecenter.h.

◆ ntotal_

Index votca::xtp::TCMatrix_gwbse::ntotal_
private

Definition at line 308 of file threecenter.h.

◆ partially_rotated_

bool votca::xtp::TCMatrix_gwbse::partially_rotated_ = false
private

Definition at line 314 of file threecenter.h.


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