Coulomb backends¤
Two-electron strategies as values. Each knob lives on the backend it
configures; inert combinations raise at the factory. Density fitting is the
default (df() = def2-universal-jkfit with the chunk="auto",
device-aware memory policy, auxiliary functions up to i, and a spherical
auxiliary span on the materialized path; see df(spherical=...));
exact() is the O(N⁴) reference path. Range-separated hybrids run on every
DF backend, materialized, streamed, or mesh-sharded.
The Coulomb backends tutorial has the
backend-choice table.
dftax.ks.terms.exact(*, screen: float | None = None, stream: bool = False) -> ExactSpec
¤
Exact 4-center ERI Coulomb/exchange (small systems; O(N⁴) memory).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
screen
|
float | None
|
optional Cauchy-Schwarz threshold; negligible ERI quartets are skipped when materializing the tensor. |
None
|
stream
|
bool
|
contract J/K on the fly instead of materializing the ERI
tensor (O(N²) memory, slower; incompatible with |
False
|
dftax.ks.terms.df(auxbasis: str | BasisData = 'def2-universal-jkfit', *, chunk: int | str | None = 'auto', screen: float | str | None = 'auto', spherical: bool | None = None, whiten: bool | None = None, packed: bool | str = 'auto') -> DFSpec
¤
Density-fitted (RI) Coulomb/exchange with the given auxiliary basis.
This is the KS default backend (O(N³) memory; RI error sub-mHa with a
JK-fitting set); :func:exact remains available for small systems and
reference comparisons.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
auxbasis
|
str | BasisData
|
JK-fitting auxiliary basis name (default
|
'def2-universal-jkfit'
|
chunk
|
int | str | None
|
RI memory strategy. |
'auto'
|
screen
|
float | str | None
|
relative Cauchy-Schwarz threshold dropping negligible bra
pairs (survivors are O(N) for extended systems). On the
materialized path it is a shell-pair compact gather that omits
the screened shell-pairs from the 3-center build (they stay
exactly zero); with an int |
'auto'
|
spherical
|
bool | None
|
auxiliary basis span. |
None
|
whiten
|
bool | None
|
fold the metric into the materialized tensor once, |
None
|
packed
|
bool | str
|
store the whitened tensor packed over the kept bra shell
pairs, |
'auto'
|
Example
KS(mol, xc) # same as coulomb=df()
KS(mol, xc, coulomb=df(chunk=None)) # force materialized
KS(mol, xc, coulomb=df("def2-universal-jkfit", chunk=64)) # streamed