DF-CCSD / CCSD(T): implementation status

Last updated: 2026-06-10 Branch: main Status: validated, ungated. Closed-shell small-molecule pilot (dense O(N^6), RHF references only).


What it is

cpp/src/ccsd.cpp implements closed-shell DF-CCSD and perturbative (T) on a converged RHF reference, exposed as vibeqc.cc.run_ccsd and run_job(method="ccsd") / run_job(method="ccsd(t)").

The equations are the closed-shell spin integration of the spin-orbital CCSD working equations of Stanton, Gauss, Watts and Bartlett, JCP 94, 4334 (1991) (SGWB). The spin-orbital original is implemented verbatim in python/vibeqc/dlpno/_ccsd_ref.py and is FCI-anchored (tests/test_dlpno_ccsd.py::TestAnchor). The (T) correction implements the Raghavachari 1989 formulas, spin-integrated classwise (the full derivation and term provenance are documented inline in cpp/src/ccsd.cpp).

Validation chain (2026-06-10)

  1. Spin-orbital reference kernel == FCI on H2 (2-electron CCSD limit) and sits the physically required ~0.3% above full CASCI(7,10)=FCI correlation on H2O/STO-3G (tests/test_dlpno_ccsd.py).

  2. The closed-shell spatial equations were validated against that kernel residual-by-residual at random amplitudes (machine precision, |dr| < 1e-11) on H2O/STO-3G and H2O/def2-SVP before transcription to C++.

  3. The C++ kernel is pinned to the reference by tests/test_ccsd_anchor.py:

    • H2O/STO-3G: E_corr(CCSD) = -0.055443, within 5e-6 Ha of the anchor, above the FCI correlation (-0.055588).

    • H2O/def2-SVP (slow lane): E_corr(CCSD) = -0.216091, within 5e-6 Ha of the anchor.

    • (T): -0.000076577 (STO-3G), -0.003222076 (def2-SVP), pinned against the blockwise spin-integrated reference values (cross-checked vs brute-force spin-orbital evaluation).

  4. Cross-code parity vs PySCF DF-CCSD/(T) (tests/test_ccsd.py) runs wherever PySCF is installed (importorskip; PySCF is not a vibe-qc dependency, CLAUDE.md section 10).

History: before 2026-06-10 the kernel overshot the FCI correlation by 41 mHa on H2O/STO-3G (the T2 residual mixed spin-orbital permutation structure with spatial amplitudes and an ad-hoc “DressJK” integral dressing). The rewrite replaced the residual code entirely; the gating test test_h2o_anchor_sits_above_fci_by_triples_margin makes that defect class unrepresentable. The VIBEQC_EXPERIMENTAL_CCSD gate was lifted with the rewrite.

Current limitations (documented, not gated)

  • Closed-shell RHF references only. UHF-CCSD is roadmapped.

  • Dense O(N^6) pilot: the (ae|bf) block is materialised (nv^4 memory) and contractions are straightforward OMP loops plus a few GEMMs. Fine for small molecules (water/DZ converges in seconds); not tuned for production scale. Batched/three-index-direct assembly is future work.

  • (T) assumes canonical orbitals (f_ov = 0 in the triples denominators), the standard convention.

  • Frozen-core: supported (n_frozen_core); run_job defaults to chemical cores via vibeqc.cc.chemical_core_orbital_count. Frozen virtuals are not supported.

Files

File

Purpose

cpp/include/vibeqc/ccsd.hpp

API + equation provenance block

cpp/src/ccsd.cpp

CCSD residuals, DIIS, classwise (T)

python/vibeqc/cc.py

Python wrapper, aux autodetect, core counting

python/vibeqc/runner.py

method="ccsd" / "ccsd(t)" block

python/vibeqc/dlpno/_ccsd_ref.py

spin-orbital SGWB anchor kernel

tests/test_ccsd_anchor.py

anchor gates (always on)

tests/test_ccsd.py

PySCF cross-checks (skip without PySCF)

python/vibeqc/output/citations/database.toml

ccsd / ccsd(t) routes

Roadmap

  1. UHF-CCSD / UCCSD(T) for open-shell references.

  2. Batched three-index-direct contractions (drop the nv^4 block, blocked ring intermediates) for production-size molecules.

  3. Restricted-triple loops in (T) (currently full ijk sums with classwise spin weights; a factor ~6 of headroom).

  4. Frozen natural orbitals (DePrince-Sherrill 2013 FNO truncation).