Difference-Density SCF (sadscf)
Difference-density SCF (dSCF) is an alternative formulation of the SCF procedure
that reframes the working variable as the difference between the true electronic
density and a superposition-of-atomic-densities (SAD) reference. It produces the
same Hartree–Fock / Kohn–Sham solution as the standard procedure but allows much
more aggressive numerical approximations, giving substantial speedups on large
systems. It is selected with scf sadscf.
The difference-density idea
The total density matrix is written as a fixed SAD reference plus a difference,
where \(\mathbf{D}^0\) is the superposition of atomic densities (the same SAD used as the default initial guess) and \(\mathbf{D}^\Delta\) is the difference density — the electronic deformation that accompanies bond formation, lone pairs, polarization, etc. The Hartree–Fock energy is then recast as a functional of \(\mathbf{D}^\Delta\), splitting the problem into two parts:
- a zeroth-order (reference) term \(E^0\) and its external potential \(\mathbf{V}^0\), which depend only on the SAD density. Because \(\mathbf{D}^0\) is atom-block-diagonal, these are highly sparse and can be evaluated cheaply with high precision (scaling as \(O(N^2)\), or even linearly for neutral spherical atoms); and
- a difference term \(E^\Delta\), converged self-consistently, whose Fock matrix uses the difference Coulomb and exchange matrices,
This is formally identical to an ordinary Fock matrix, but written relative to the SAD reference.
Why it is faster
The chemically relevant energy is a difference of large, cancelling absolute energies (a molecule's total energy is enormous compared to its bonding energy). Standard SCF must compute that small difference from large total quantities, which demands very high relative precision. dSCF instead works directly with the small, nearly traceless difference density, so the difference Fock build tolerates aggressive approximation without spoiling the final energy:
- Single- or dynamic-precision J/K builds — the difference J and K matrices can be built almost entirely in single precision (up to ~32× faster than double on GPUs) while keeping errors below ~1 mE\(_h\) (single) or ~10 µE\(_h\) (dynamic).
- Aggressive Schwarz screening — the pair space can be sieved much more aggressively than in integral-direct SCF, because the bulk of the electrostatic interaction is already accounted for in the high-precision reference term \(E^0\).
- Incremental Fock builds — when restarting incrementally, one builds \(J^\Delta\) and \(K^\Delta\) directly.
A practical "dynamically sieved dSCF" recipe burns in with single precision and a loose Schwarz cutoff, then tightens the cutoff and switches on dynamic precision (restarting DIIS). Together these give speedups of up to ~70% over TeraChem's already heavily optimized SCF, for systems up to ~1860 atoms and more than 10 000 basis functions, with sub-µE\(_h\) accuracy. For the very largest systems the accelerated J/K builds expose the cubic-scaling linear algebra (diagonalization, DIIS gradient) as the new bottleneck.
The extension to Kohn–Sham DFT is straightforward; because the exchange–correlation potential is nonlinear in the density, it is always evaluated from the full density rather than the difference density.
Relation to THC-SCF
The THC-SCF method (scf thcsadscf) combines this
difference-density ansatz with tensor-hypercontraction integrals — the
difference-density picture is what lets the approximate THC integrals be used in
the iterations without sacrificing accuracy.
The SAD reference
The SAD reference density is built from spherically and spin-averaged atomic calculations for each unique element. The net molecular charge is carried entirely by \(\mathbf{D}^\Delta\) (since \(\mathbf{D}^0\) is always neutral). For systems where the neutral SAD guess struggles to converge, a partially charged or spin-polarized SAD reference can help; the atomic-density construction is controlled by the following keywords (shared with the initial guess):
| Keyword | Type | Default | Description |
|---|---|---|---|
scf |
string | diis |
Set to sadscf to run difference-density SCF. |
sad_fxnl |
string | hf |
Functional used for the atomic SAD computations: hf or blyp. |
sad_spherical |
bool | — | Spherically average the atomic SAD density. |
sad_avgspin |
bool | — | Spin-average the atomic SAD density (use a spin-polarized atomic reference when no). |
Example
A difference-density SCF gradient on triplet O\(_2\) with ROB3LYP (from the test suite):
basis 6-31g
method rob3lyp
scf sadscf
precision double
dftgrid 2
maxit 1000
purify no
levelshift yes
levelshiftvala 2.5
levelshiftvalb 1.0
charge 0
spinmult 3
run gradient
coordinates o2.xyz
Reference
R. M. Parrish, F. Liu, and T. J. Martínez, "Communication: A difference density picture for the self-consistent field ansatz," J. Chem. Phys. 144, 131101 (2016). doi:10.1063/1.4945277