projects / Periodic double-hybrid DFT

Periodic double-hybrid DFT

● active 2026 — python, pyscf github ↗
kdh cover art

Double-hybrid functionals replace part of a hybrid functional’s correlation with an MP2-style term built from its own orbitals, which makes them some of the most accurate DFT available. Most periodic codes lack that MP2 step, and double hybrids have thus stayed mostly molecular. kdh brings the family to k-point periodic calculations as an extension to PySCF.

Background

A double hybrid starts from an ordinary hybrid, which already mixes exact exchange into a semilocal functional, and applies the same idea to correlation. The exchange-correlation energy is written as

ExcDH=axExHF+(1ax)ExDFT+(1ac)EcDFT+acEcPT2E_{xc}^{\mathrm{DH}} = a_x\,E_x^{\mathrm{HF}} + (1-a_x)\,E_x^{\mathrm{DFT}} + (1-a_c)\,E_c^{\mathrm{DFT}} + a_c\,E_c^{\mathrm{PT2}}

where ExHFE_x^{\mathrm{HF}} is exact exchange evaluated with the Kohn-Sham orbitals, ExDFTE_x^{\mathrm{DFT}} and EcDFTE_c^{\mathrm{DFT}} are the semilocal exchange and correlation of the parent functional, EcPT2E_c^{\mathrm{PT2}} is an MP2-like second-order perturbative correlation energy built from the occupied and virtual orbitals of the converged reference, and axa_x and aca_c are the mixing fractions that define each functional. Many modern functionals scale the two spin components of the perturbative term separately, so the last term generalizes to

acEcPT2    cOSEcOS+cSSEcSSa_c\,E_c^{\mathrm{PT2}} \;\rightarrow\; c_{\mathrm{OS}}\,E_c^{\mathrm{OS}} + c_{\mathrm{SS}}\,E_c^{\mathrm{SS}}

where EcOSE_c^{\mathrm{OS}} and EcSSE_c^{\mathrm{SS}} are the opposite-spin and same-spin parts of the PT2 energy and cOSc_{\mathrm{OS}} and cSSc_{\mathrm{SS}} are their coefficients. The DSD family and the OS-only functionals live in this generalized form. A further variant, the xDH flow behind XYG3-type functionals, converges the SCF with one functional and then assembles the final energy non-self-consistently with another.

The first three terms cost no more than a conventional hybrid, and periodic codes handle them routinely. The PT2 term is the obstacle. It requires the full virtual orbital space and two-electron integrals transformed into the orbital basis, and in a crystal the pair sums run over combinations of k-points across the Brillouin zone while the energy denominators shrink as the band gap narrows. Most periodic DFT codes never build that machinery, which is why the family has stayed molecular.

Drivers

Three drivers cover the common cases. KRDH handles k-point periodic systems on top of PySCF’s KMP2, with opposite-spin and same-spin scaling, safety gates on the reference, and SCF stabilizers, and it supports the non-self-consistent xDH flow. RDFDH and UDFDH handle closed- and open-shell molecules, with an optional density-fitting path for the integrals, and the open-shell driver accepts any spin state.

Functionals

A functional registry maps names like B2PLYP, XYG3, and the DSD family onto their exchange, correlation, and PT2 coefficients, so every driver reads the same definitions. The registry also carries XYGJ-OS, PBE0-DH, PBE0-QIDH, PBE0-2, mPW2PLYP, B2GP-PLYP, the revDSD revisions, and the SCS-MP2 and SOS-MP2 limits. D3 dispersion is built in through dftd3, in both the Becke-Johnson damped D3(BJ) and zero-damped D3(0) forms.

Gradients

The closed-shell driver carries an analytic nuclear gradient for functionals with unscaled MP2 correlation, validated to 4e-7 Ha/bohr against finite differences. Finite-difference numerical gradients cover the remaining functionals, and geometry optimization sits on top of both.

Validation

A 120-test suite passes on stock PySCF, covering the functional registry, the dispersion terms, and the gradients, with reproducibility checked across PySCF 2.10 and 2.12. The periodic driver has been exercised in a lattice-constant validation campaign across twelve solids on HPC clusters.