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

Takes a density matrix and and an auxiliary basis set and calculates the electron repulsion integrals. More...

#include <ERIs.h>

Collaboration diagram for votca::xtp::ERIs:

Public Member Functions

void Initialize (const AOBasis &dftbasis, const AOBasis &auxbasis, double pair_threshold=0.0)
void Initialize_4c (const AOBasis &dftbasis)
Eigen::MatrixXd CalculateERIs_3c (const Eigen::MatrixXd &DMAT) const
std::array< Eigen::MatrixXd, 2 > CalculateERIs_EXX_3c (const Eigen::MatrixXd &occMos, const Eigen::MatrixXd &DMAT) const
Eigen::MatrixXd CalculateEXX_3c (const Eigen::MatrixXd &occMos, const Eigen::MatrixXd &DMAT) const
Index AuxSize () const
 Number of auxiliary functions the 3c tensor is stored for.
Index StoredPairs () const
 Stored basis-function pairs of the 3c tensor and all N(N+1)/2 pairs.
Index AllPairs () const
double MetricSeconds () const
 Wall time spent on the aux Coulomb metric and its inverse square root.
Eigen::MatrixXd CalculateERIs_4c (const Eigen::MatrixXd &DMAT, double error) const
std::array< Eigen::MatrixXd, 2 > CalculateERIs_EXX_4c (const Eigen::MatrixXd &DMAT, double error) const
Index Removedfunctions () const

Static Public Member Functions

static double CalculateEnergy (const Eigen::MatrixXd &DMAT, const Eigen::MatrixXd &matrix_operator)

Private Member Functions

Eigen::MatrixXd CalculateEXX_dmat (const Eigen::MatrixXd &DMAT) const
Eigen::MatrixXd CalculateEXX_mos (const Eigen::MatrixXd &occMos) const
Eigen::MatrixXd ExchangeFromFactors (const Eigen::MatrixXd &factors, Index npos) const
std::vector< std::vector< libint2::ShellPair > > ComputeShellPairData (const std::vector< libint2::Shell > &basis, const std::vector< std::vector< Index > > &shellpairs) const
Eigen::MatrixXd ComputeSchwarzShells (const AOBasis &dftbasis) const
Eigen::MatrixXd ComputeShellBlockNorm (const Eigen::MatrixXd &dmat) const
template<bool with_exchange>
std::array< Eigen::MatrixXd, 2 > Compute4c (const Eigen::MatrixXd &dmat, double error) const

Private Attributes

std::vector< libint2::Shell > basis_
std::vector< Index > starts_
std::vector< std::vector< Index > > shellpairs_
std::vector< std::vector< libint2::ShellPair > > shellpairdata_
Index maxnprim_
Index maxL_
TCMatrix_dft threecenter_
Eigen::MatrixXd schwarzscreen_

Static Private Attributes

static constexpr double kDensityRankCutoff = 1e-12
static constexpr Index kExchangeBatchRows = 1024
 Rows of B_P X collected per thread before one rank update.

Detailed Description

Takes a density matrix and and an auxiliary basis set and calculates the electron repulsion integrals.

Definition at line 35 of file ERIs.h.

Member Function Documentation

◆ AllPairs()

Index votca::xtp::ERIs::AllPairs ( ) const
inline

Definition at line 69 of file ERIs.h.

◆ AuxSize()

Index votca::xtp::ERIs::AuxSize ( ) const
inline

Number of auxiliary functions the 3c tensor is stored for.

Definition at line 66 of file ERIs.h.

◆ CalculateEnergy()

double votca::xtp::ERIs::CalculateEnergy ( const Eigen::MatrixXd & DMAT,
const Eigen::MatrixXd & matrix_operator )
inlinestatic

Definition at line 85 of file ERIs.h.

◆ CalculateERIs_3c()

Eigen::MatrixXd votca::xtp::ERIs::CalculateERIs_3c ( const Eigen::MatrixXd & DMAT) const

Definition at line 89 of file ERIs.cc.

◆ CalculateERIs_4c()

Eigen::MatrixXd votca::xtp::ERIs::CalculateERIs_4c ( const Eigen::MatrixXd & DMAT,
double error ) const
inline

Definition at line 73 of file ERIs.h.

◆ CalculateERIs_EXX_3c()

std::array< Eigen::MatrixXd, 2 > votca::xtp::ERIs::CalculateERIs_EXX_3c ( const Eigen::MatrixXd & occMos,
const Eigen::MatrixXd & DMAT ) const
inline

Definition at line 46 of file ERIs.h.

◆ CalculateERIs_EXX_4c()

std::array< Eigen::MatrixXd, 2 > votca::xtp::ERIs::CalculateERIs_EXX_4c ( const Eigen::MatrixXd & DMAT,
double error ) const
inline

Definition at line 78 of file ERIs.h.

◆ CalculateEXX_3c()

Eigen::MatrixXd votca::xtp::ERIs::CalculateEXX_3c ( const Eigen::MatrixXd & occMos,
const Eigen::MatrixXd & DMAT ) const
inline

Exchange matrix only: from the occupied MOs if given, otherwise from the density matrix.

Definition at line 56 of file ERIs.h.

◆ CalculateEXX_dmat()

Eigen::MatrixXd votca::xtp::ERIs::CalculateEXX_dmat ( const Eigen::MatrixXd & DMAT) const
private

Definition at line 122 of file ERIs.cc.

◆ CalculateEXX_mos()

Eigen::MatrixXd votca::xtp::ERIs::CalculateEXX_mos ( const Eigen::MatrixXd & occMos) const
private

Definition at line 162 of file ERIs.cc.

◆ Compute4c()

template<bool with_exchange>
template std::array< Eigen::MatrixXd, 2 > votca::xtp::ERIs::Compute4c< false > ( const Eigen::MatrixXd & dmat,
double error ) const
private

Definition at line 319 of file libint2_calls.cc.

◆ ComputeSchwarzShells()

Eigen::MatrixXd votca::xtp::ERIs::ComputeSchwarzShells ( const AOBasis & dftbasis) const
private

Definition at line 278 of file libint2_calls.cc.

◆ ComputeShellBlockNorm()

Eigen::MatrixXd votca::xtp::ERIs::ComputeShellBlockNorm ( const Eigen::MatrixXd & dmat) const
private

Definition at line 70 of file ERIs.cc.

◆ ComputeShellPairData()

std::vector< std::vector< libint2::ShellPair > > votca::xtp::ERIs::ComputeShellPairData ( const std::vector< libint2::Shell > & basis,
const std::vector< std::vector< Index > > & shellpairs ) const
private

Definition at line 53 of file ERIs.cc.

◆ ExchangeFromFactors()

Eigen::MatrixXd votca::xtp::ERIs::ExchangeFromFactors ( const Eigen::MatrixXd & factors,
Index npos ) const
private

-sum_P (B_P X)(B_P X)^T + sum_P (B_P Y)(B_P Y)^T for factors = [X Y], X being the first npos columns.

Definition at line 174 of file ERIs.cc.

◆ Initialize()

void votca::xtp::ERIs::Initialize ( const AOBasis & dftbasis,
const AOBasis & auxbasis,
double pair_threshold = 0.0 )

pair_threshold: shell pairs whose three-centre integrals are bounded by less than this are not stored (see TCMatrix_dft); 0 keeps all.

Definition at line 33 of file ERIs.cc.

◆ Initialize_4c()

void votca::xtp::ERIs::Initialize_4c ( const AOBasis & dftbasis)

Definition at line 39 of file ERIs.cc.

◆ MetricSeconds()

double votca::xtp::ERIs::MetricSeconds ( ) const
inline

Wall time spent on the aux Coulomb metric and its inverse square root.

Definition at line 71 of file ERIs.h.

◆ Removedfunctions()

Index votca::xtp::ERIs::Removedfunctions ( ) const
inline

Definition at line 83 of file ERIs.h.

◆ StoredPairs()

Index votca::xtp::ERIs::StoredPairs ( ) const
inline

Stored basis-function pairs of the 3c tensor and all N(N+1)/2 pairs.

Definition at line 68 of file ERIs.h.

Member Data Documentation

◆ basis_

std::vector<libint2::Shell> votca::xtp::ERIs::basis_
private

Definition at line 91 of file ERIs.h.

◆ kDensityRankCutoff

double votca::xtp::ERIs::kDensityRankCutoff = 1e-12
staticconstexprprivate

Relative size below which eigenvalues of a density matrix are treated as zero when it is factorised for the exchange build.

Definition at line 101 of file ERIs.h.

◆ kExchangeBatchRows

Index votca::xtp::ERIs::kExchangeBatchRows = 1024
staticconstexprprivate

Rows of B_P X collected per thread before one rank update.

Definition at line 109 of file ERIs.h.

◆ maxL_

Index votca::xtp::ERIs::maxL_
private

Definition at line 97 of file ERIs.h.

◆ maxnprim_

Index votca::xtp::ERIs::maxnprim_
private

Definition at line 96 of file ERIs.h.

◆ schwarzscreen_

Eigen::MatrixXd votca::xtp::ERIs::schwarzscreen_
private

Definition at line 124 of file ERIs.h.

◆ shellpairdata_

std::vector<std::vector<libint2::ShellPair> > votca::xtp::ERIs::shellpairdata_
private

Definition at line 95 of file ERIs.h.

◆ shellpairs_

std::vector<std::vector<Index> > votca::xtp::ERIs::shellpairs_
private

Definition at line 94 of file ERIs.h.

◆ starts_

std::vector<Index> votca::xtp::ERIs::starts_
private

Definition at line 92 of file ERIs.h.

◆ threecenter_

TCMatrix_dft votca::xtp::ERIs::threecenter_
private

Definition at line 122 of file ERIs.h.


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