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

RI three-centre tensor of the DFT code, B_P,mu nu = sum_Q V^-1/2_PQ (Q|mu nu). More...

#include <threecenter.h>

Inheritance diagram for votca::xtp::TCMatrix_dft:
Collaboration diagram for votca::xtp::TCMatrix_dft:

Classes

struct  Run

Public Member Functions

void Fill (const AOBasis &auxbasis, const AOBasis &dftbasis, double pair_threshold=0.0, Index build_columns=kBuildColumns)
Index size () const
 Number of aux functions.
Index basissize () const
 Number of basis functions.
Eigen::MatrixXd FullMatrix (Index P) const
 B_P as a full symmetric matrix, zero for the dropped pairs.
void FillFullMatrix (Index P, Eigen::MatrixXd &full) const
Eigen::VectorXd PackWeighted (const Eigen::MatrixXd &full) const
Eigen::MatrixXd Unpack (const Eigen::VectorXd &packed) const
const Eigen::MatrixXd & Data () const
 The stored tensor, one column per aux function.
Index StoredPairs () const
 Stored pairs (nu <= mu) and all pairs N(N+1)/2.
Index AllPairs () const
double MetricSeconds () const
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

Private Member Functions

std::vector< std::vector< Index > > SignificantPairs (const AOBasis &dftbasis, const Eigen::MatrixXd &metric, double pair_threshold) const
void SetupLayout (const AOBasis &dftbasis, const std::vector< std::vector< Index > > &kept)

Private Attributes

Eigen::MatrixXd data_
std::vector< Run > runs_
std::vector< Index > col_offset_
Index basissize_ = 0
double metric_seconds_ = 0.0

Static Private Attributes

static constexpr Index kBuildColumns = 512

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

RI three-centre tensor of the DFT code, B_P,mu nu = sum_Q V^-1/2_PQ (Q|mu nu).

Only the significant basis-function pairs are stored. A shell pair (a,b) is kept if the Schwarz bound of its three-centre integrals, max_P sqrt((P|P)) sqrt((ab|ab)), reaches the pair threshold; the integrals of the dropped pairs are smaller than the threshold. As V^-1/2 only mixes the aux index, the dropped pairs are the same for every aux function. Threshold 0 keeps every pair.

Storage: one column of data_ per aux function, holding the kept (nu, mu) with nu <= mu, column mu after column mu-1 (upper triangle, column-major).

Definition at line 74 of file threecenter.h.

Member Function Documentation

◆ AllPairs()

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

Definition at line 109 of file threecenter.h.

◆ basissize()

Index votca::xtp::TCMatrix_dft::basissize ( ) const
inline

Number of basis functions.

Definition at line 84 of file threecenter.h.

◆ Data()

const Eigen::MatrixXd & votca::xtp::TCMatrix_dft::Data ( ) const
inline

The stored tensor, one column per aux function.

Definition at line 105 of file threecenter.h.

◆ Fill()

void votca::xtp::TCMatrix_dft::Fill ( const AOBasis & auxbasis,
const AOBasis & dftbasis,
double pair_threshold = 0.0,
Index build_columns = kBuildColumns )

build_columns: pair columns one thread builds at a time (see kBuildColumns); only changes the memory and work split, not the result.

Definition at line 504 of file libint2_calls.cc.

◆ FillFullMatrix()

void votca::xtp::TCMatrix_dft::FillFullMatrix ( Index P,
Eigen::MatrixXd & full ) const

Writes B_P into full (basissize x basissize). The entries of dropped pairs are not written: full must hold zeros there, as it does when the same buffer is reused for all aux functions.

Definition at line 319 of file threecenter.cc.

◆ FullMatrix()

Eigen::MatrixXd votca::xtp::TCMatrix_dft::FullMatrix ( Index P) const

B_P as a full symmetric matrix, zero for the dropped pairs.

Definition at line 329 of file threecenter.cc.

◆ MetricSeconds()

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

Definition at line 111 of file threecenter.h.

◆ PackWeighted()

Eigen::VectorXd votca::xtp::TCMatrix_dft::PackWeighted ( const Eigen::MatrixXd & full) const

Packs the lower triangle of a matrix into the stored pair layout, off-diagonal entries counted twice, so that for symmetric D PackWeighted(D).dot(data column P) = sum_{mu nu} B_P,mu nu D_mu nu. Like Symmetric_Matrix(full), the upper triangle is not read.

Definition at line 335 of file threecenter.cc.

◆ SetupLayout()

void votca::xtp::TCMatrix_dft::SetupLayout ( const AOBasis & dftbasis,
const std::vector< std::vector< Index > > & kept )
private

Definition at line 286 of file threecenter.cc.

◆ SignificantPairs()

std::vector< std::vector< Index > > votca::xtp::TCMatrix_dft::SignificantPairs ( const AOBasis & dftbasis,
const Eigen::MatrixXd & metric,
double pair_threshold ) const
private

Kept shells of the pairs (a, b) with b <= a, for each shell a, in increasing order; a itself is always kept.

Definition at line 457 of file libint2_calls.cc.

◆ size()

Index votca::xtp::TCMatrix_dft::size ( ) const
inline

Number of aux functions.

Definition at line 82 of file threecenter.h.

◆ StoredPairs()

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

Stored pairs (nu <= mu) and all pairs N(N+1)/2.

Definition at line 108 of file threecenter.h.

◆ Unpack()

Eigen::MatrixXd votca::xtp::TCMatrix_dft::Unpack ( const Eigen::VectorXd & packed) const

Inverse layout map without weights: symmetric matrix from a packed vector, zero for the dropped pairs.

Definition at line 348 of file threecenter.cc.

Member Data Documentation

◆ basissize_

Index votca::xtp::TCMatrix_dft::basissize_ = 0
private

Definition at line 135 of file threecenter.h.

◆ col_offset_

std::vector<Index> votca::xtp::TCMatrix_dft::col_offset_
private

Definition at line 134 of file threecenter.h.

◆ data_

Eigen::MatrixXd votca::xtp::TCMatrix_dft::data_
private

Definition at line 131 of file threecenter.h.

◆ kBuildColumns

Index votca::xtp::TCMatrix_dft::kBuildColumns = 512
staticconstexprprivate

Upper bound for the pair columns that one thread builds at a time: the transient memory of Fill is two such blocks of aux size per thread.

Definition at line 140 of file threecenter.h.

◆ metric_seconds_

double votca::xtp::TCMatrix_dft::metric_seconds_ = 0.0
private

Definition at line 136 of file threecenter.h.

◆ runs_

std::vector<Run> votca::xtp::TCMatrix_dft::runs_
private

Definition at line 132 of file threecenter.h.


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