occ
Loading...
Searching...
No Matches
occ::qm::PackedDFStore Class Reference

Three-centre integrals (μν|P) over the screened canonical shell pairs (q <= p, as IntegralEngine::shellpairs()), packed: one contiguous np x nq block per stored shell pair, every auxiliary function a column. More...

#include <df_packed_store.h>

Classes

struct  Block

Public Types

using ShellPairList = std::vector<std::vector<size_t>>

Public Member Functions

void build (IntegralEngine &engine, const CoulombMetric &metric, size_t max_bytes=unlimited)
 Stores the pairs that fit max_bytes, from engine at its current operator, and folds metric in when all of them fit.
void clear ()
bool built () const
bool empty () const
bool complete () const
 Every screened pair is stored, and the metric is folded in.
size_t bytes () const
size_t num_aux () const
 Auxiliary columns: fewer than the auxiliary basis once folded with a metric whose eigendecomposition fallback dropped vectors.
const ShellPairList & unstored () const
Mat contract (const std::vector< Mat > &densities) const
 Column c: sum over the stored pairs of D_c(μ,ν) B(μν,P), each D_c a symmetric nbf x nbf matrix.
std::vector< Mat > expand (const Mat &x) const
 Matrix c: sum_P B(μν,P) x(P,c) over the stored pairs, symmetric.
std::vector< Mat > exchange (const std::vector< Mat > &C, const std::vector< std::pair< int, int > > &pairs) const
 sum_P (B_P C_s)(B_P C_t)^T for every requested (s, t), on a complete store.
Mat half_transform (Eigen::Ref< const Mat > C_left, Eigen::Ref< const Mat > C_right) const
 B(i*nR + a, P) = sum_μν C_left(μ,i) C_right(ν,a) B_P(μν) on a complete store, i.e.

Static Public Member Functions

static size_t bytes_for (const gto::AOBasis &basis, const ShellPairList &shellpairs, size_t naux)
 Bytes of a store holding every pair of shellpairs.

Static Public Attributes

static constexpr size_t unlimited = std::numeric_limits<size_t>::max()

Detailed Description

Three-centre integrals (μν|P) over the screened canonical shell pairs (q <= p, as IntegralEngine::shellpairs()), packed: one contiguous np x nq block per stored shell pair, every auxiliary function a column.

Pairs the shell-pair screen drops are never stored, and only one triangle is, so the store is a fraction of the dense nbf x nbf x naux one.

Under a byte budget only some pairs are stored – those most expensive to recompute per byte first – and unstored() lists the rest for the caller to compute directly. A complete store is folded with the Coulomb metric as soon as it is built, B = (μν|P) L^-T, so exchange and the correlated methods need no metric solve; a partial store keeps the raw integrals.

Member Typedef Documentation

◆ ShellPairList

using occ::qm::PackedDFStore::ShellPairList = std::vector<std::vector<size_t>>

Member Function Documentation

◆ build()

void occ::qm::PackedDFStore::build ( IntegralEngine & engine,
const CoulombMetric & metric,
size_t max_bytes = unlimited )

Stores the pairs that fit max_bytes, from engine at its current operator, and folds metric in when all of them fit.

◆ built()

bool occ::qm::PackedDFStore::built ( ) const
inline

◆ bytes()

size_t occ::qm::PackedDFStore::bytes ( ) const
inline

◆ bytes_for()

size_t occ::qm::PackedDFStore::bytes_for ( const gto::AOBasis & basis,
const ShellPairList & shellpairs,
size_t naux )
static

Bytes of a store holding every pair of shellpairs.

◆ clear()

void occ::qm::PackedDFStore::clear ( )

◆ complete()

bool occ::qm::PackedDFStore::complete ( ) const
inline

Every screened pair is stored, and the metric is folded in.

◆ contract()

Mat occ::qm::PackedDFStore::contract ( const std::vector< Mat > & densities) const

Column c: sum over the stored pairs of D_c(μ,ν) B(μν,P), each D_c a symmetric nbf x nbf matrix.

◆ empty()

bool occ::qm::PackedDFStore::empty ( ) const
inline

◆ exchange()

std::vector< Mat > occ::qm::PackedDFStore::exchange ( const std::vector< Mat > & C,
const std::vector< std::pair< int, int > > & pairs ) const

sum_P (B_P C_s)(B_P C_t)^T for every requested (s, t), on a complete store.

Returns one nbf x nbf matrix per pair.

◆ expand()

std::vector< Mat > occ::qm::PackedDFStore::expand ( const Mat & x) const

Matrix c: sum_P B(μν,P) x(P,c) over the stored pairs, symmetric.

◆ half_transform()

Mat occ::qm::PackedDFStore::half_transform ( Eigen::Ref< const Mat > C_left,
Eigen::Ref< const Mat > C_right ) const

B(i*nR + a, P) = sum_μν C_left(μ,i) C_right(ν,a) B_P(μν) on a complete store, i.e.

the metric-folded MO three-index tensor (nL*nR x num_aux).

◆ num_aux()

size_t occ::qm::PackedDFStore::num_aux ( ) const
inline

Auxiliary columns: fewer than the auxiliary basis once folded with a metric whose eigendecomposition fallback dropped vectors.

◆ unstored()

const ShellPairList & occ::qm::PackedDFStore::unstored ( ) const
inline

Member Data Documentation

◆ unlimited

size_t occ::qm::PackedDFStore::unlimited = std::numeric_limits<size_t>::max()
staticconstexpr

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