Skip to content

SCF

Density fitting approximation for ERIs

Electron repulsion integrals (ERIs) are four-centred, two-electron integrals required in nearly all quantum chemistry methods. The general idea of density fitting approximation, also known as resolution of identity (RI), is to decompose the four-center integrals into a contraction between two-center integrals, built with a set of pre-fitted auxiliary basis functions, and three-center integrals, built with the auxiliary basis and original basis functions, as outlined in equation below:

\[ (\mu\nu|\lambda\sigma) \approx \sum_{PQ}(\mu\nu|P)[J_{PQ}]^{-1} (Q|\lambda\sigma), \]

where \(P, Q\) are indices of the auxiliary basis functions (fitting vectors), \(J_{PQ} \equiv (P|Q) = \int \phi_P(\mathbf{r}_1) \frac{1}{|\mathbf{r}_1 - \mathbf{r}_2|} \phi_Q(\mathbf{r}_2) \text{d}\mathbf{r}_1 \text{d}\mathbf{r}_2\) is the two-center integral formed from the auxiliary basis functions (also known as the Coulomb metric matrix), and \((Q|\lambda\sigma) = \int \phi_Q(\mathbf{r}_1) \frac{1}{|\mathbf{r}_1 - \mathbf{r}_2|} \phi_{\lambda}(\mathbf{r}_2) \phi_{\sigma}(\mathbf{r}_2) \text{d}\mathbf{r}_1 \text{d}\mathbf{r}_2\) is the three-center integral formed from the auxiliary basis functions and the atomic basis functions.

Although the formal scaling of ERI calculations are still the same, by pre-calculating and storing both the two- and three-center integrals and making use of the highly optimised cuBLAS linear algebra routines, the pre-factor is significantly reduced.

With the keywords use_density_fitting specified, TeraChem will automatically perform density fitting for the ERIs' Fock build and gradient routines.

The df_auxiliary_basis takes the same format as the basis keyword, either a TeraChem's built-in basis set name or a path to a basis set file. Leaving it empty or setting it to default will use the default auxiliary basis set based on the basis keyword, provided the latter has a corresponding built-in auxiliary basis set.

Summary of density fitting keywords

Keyword Type Default Description
use_density_fitting string no Turn on density fitting approximation for J and/or K routines (fock build and gradient). Valid options: j, k, jk/kj/yes, no
df_auxiliary_basis string default Default, or the name of or the path to the auxiliary basis set to use for density fitting
df_metric_thre float 1e-7 Threshold for density fitting metric matrix
df_decompress_pij bool no Whether to decompress the pair-screened raw 3-center integrals
df_num_check bool no Whether to perform numerical checks of the density fitting gradients
df_orb_coeff_k bool yes Whether to use orbital coefficients for K
df_custom_kernel bool no Whether to use custom kernel for density fitting K build (less performant)
df_int_direct_j bool no Whether to use direct integrals for J
df_aux_true_spherical bool no Whether to use spherical auxiliary basis functions

System-specific guidelines

The current implementation of density fitting stores the 3-center integrals, \(\widetilde{(P|\mu\nu)} = (P|Q)^{-1/2}(Q|\mu\nu)\), in the device memory. When the system is large, it is recommended to set df_orb_coeff_k to yes (the K routines will use the MO coefficients as input, resulting in a smaller intermediate buffer size) and df_decompress_pij to no (the pair-screened raw 3-center integrals has a smaller memory size).

Auxiliary basis set defaults

The following tables list the default auxiliary basis sets that will be used if the df_auxiliary_basis keyword is set to default.

Pople basis sets

Basis set J-fit JK-fit RI-fit OptRI
6-311G(d,p) - - 6-311gss-rifit -
6-311G** - - 6-311gss-rifit -
6-31G(d,p) - - 6-31gss-rifit -
6-31G** - - 6-31gss-rifit -

Dunning correlation-consistent basis sets

Basis set J-fit JK-fit RI-fit OptRI
cc-pVDZ - - cc-pvdz-rifit -
cc-pVTZ - cc-pvtz-jkfit cc-pvtz-rifit -
cc-pVQZ - cc-pvqz-jkfit cc-pvqz-rifit -
cc-pV5Z - cc-pv5z-jkfit cc-pv5z-rifit -
aug-cc-pVDZ - - aug-cc-pvdz-rifit aug-cc-pvdz-optri
aug-cc-pVTZ - cc-pvtz-jkfit aug-cc-pvtz-rifit aug-cc-pvtz-optri
aug-cc-pVQZ - cc-pvqz-jkfit aug-cc-pvqz-rifit aug-cc-pvqz-optri
aug-cc-pV5Z - cc-pv5z-jkfit aug-cc-pv5z-rifit aug-cc-pv5z-optri

Karlsruhe basis sets

Basis set J-fit JK-fit RI-fit OptRI
def2-SV(P) def2-universal-jfit def2-sv(p)-jkfit def2-sv(p)-rifit -
def2-SVP def2-universal-jfit def2-universal-jkfit def2-svp-rifit -
def2-TZVP def2-universal-jfit def2-universal-jkfit def2-tzvp-rifit -
def2-TZVPP def2-universal-jfit def2-universal-jkfit def2-tzvpp-rifit -
def2-QZVP def2-universal-jfit def2-universal-jkfit def2-qzvp-rifit -
def2-QZVPP def2-universal-jfit def2-universal-jkfit def2-qzvpp-rifit -

N.B., A dash (-) indicates that no auxiliary basis is available for that fitting type.