quemb.molbe.eri_sparse_DF.SemiSparseSym3DTensor¶
- class quemb.molbe.eri_sparse_DF.SemiSparseSym3DTensor(unique_dense_data, nao, naux, exch_reachable)¶
Specialised datastructure for immutable, semi-sparse, and partially symmetric 3-indexed tensors.
For a tensor, \(T_{ijk}\), to be stored in this datastructure we assume
2-fold permutational symmetry for the \(i, j\) indices, i.e. \(T_{ijk} = T_{jik}\)
sparsity along the \(i, j\) indices, i.e. \(T_{ijk} = 0\) for many \(i, j\)
dense storage along the \(k\) index
It can be used for example to store the 3-center, 2-electron integrals \((\mu \nu | P)\), with AOs \(\mu, \nu\) and auxiliary basis indices \(P\). Semi-sparsely, because it is assumed that there are many exchange pairs \(\mu, \nu\) which are zero, while the integral along the auxiliary basis \(P\) is stored densely as numpy array.
2-fold permutational symmetry for the \(\mu, \nu\) pairs is assumed, i.e.
\[(\mu \nu | P) == (\nu, \mu | P)\]Note that this class is immutable which enables to store the unique (symmetry), non-zero data in a dense manner, which has some performance benefits.
Attributes
- class_type = jitclass.SemiSparseSym3DTensor#7fbbc4c027b0<_keys:array(int64, 1d, C),shape:UniTuple(int64 x 3),unique_dense_data:array(float64, 2d, C),exch_reachable:ListType[array(int64, 1d, C)],exch_reachable_with_offsets:ListType[ListType[UniTuple(int64 x 2)]],exch_reachable_unique:ListType[array(int64, 1d, C)],exch_reachable_unique_with_offsets:ListType[ListType[UniTuple(int64 x 2)]],nao:int64,naux:int64>¶
-
unique_dense_data:
ndarray
[tuple
[int
,...
],dtype
[float64
]]¶ The non-zero data that also accounts for symmetry.
-
exch_reachable:
list
[ndarray
[tuple
[int
],dtype
[NewType
(OrbitalIdx
,integer
)]]]¶ For a given
p
theexch_reachable[p]
returns allq
that are assumed unrelevant for (p q | r s) after screening. Note that (p q | P ) might still be non-zero.
-
exch_reachable_unique:
list
[ndarray
[tuple
[int
],dtype
[NewType
(OrbitalIdx
,integer
)]]]¶ This is the same as
exch_reachable
except it is accounting for symmetryp >= q
-
exch_reachable_with_offsets:
list
[list
[tuple
[int
,NewType
(OrbitalIdx
,integer
)]]]¶ The following datastructures also return the offset to index the
unique_dense_data
directly and enables very fast loops without having to compute the offset.for offset, q in self.exch_reachable_with_offsets[p]: self.unique_dense_data[offset] == self[p, q] # True
-
exch_reachable_unique_with_offsets:
list
[list
[tuple
[int
,NewType
(OrbitalIdx
,integer
)]]]¶ The following datastructures also return the offset to index the
unique_dense_data
directly and enables very fast loops without having to compute the offset. It only returnsq
withp >= q
for offset, q in self.exch_reachable_unique_with_offsets[p]: self.unique_dense_data[offset] == self[p, q] # True
Methods