Machine-generated semilocal XC kernels: meta-GGA and triplet Casida couplings, GGA kernels for the dielectric function

Description

Semi-local exchange–correlation kernels in GPAW are currently limited in two places. lrtddft2 obtains the smooth XC pair potential from a finite difference of the XC potential (Eq. 20 of Walter et al., J. Chem. Phys. 128, 244101 (2008)), which is restricted to spin-paired LDA/GGA and to singlet excitations. The response code represents fxc as a local function of G-G', which cannot represent a gradient-corrected kernel, so only (renormalized) ALDA and bootstrap kernels are available for the dielectric function.

This MR removes both restrictions by contracting analytic functional derivatives obtained from Libxc instead of displacing the density. The contraction expressions are machine generated by libxckernel and committed as a single generated module, gpaw/xckernel_fxc.py; regenerate it with

python -m xckernel.emitters.gpawwriter --emit gpaw/xckernel_fxc.py

No hand-written kernel algebra is added to GPAW: the generated file is overwritten wholesale, so extending the functional coverage is a regeneration rather than a merge.

What this adds

lrtddft2 — an analytic_fxc=True option on LrTDDFT2/Kmatrix replacing the finite-difference pair potential. The local channel u - div(v) enters the existing pair-potential slot; the meta-GGA tau channel is contracted with the kinetic-energy pair density of the inner Kohn–Sham single, built with the existing Gradient stencils and coarse-to-fine interpolation. A triplet=True option switches off the Hartree term and uses generated closed-shell spin-flip kernels. Together these give the full capability matrix: singlet + triplet × LDA/GGA/meta-GGA, where meta-GGA and triplet were previously unavailable at any rung.

response — SemilocalFXCKernel/SemilocalFXCCalculator represent the semilocal fxc operator exactly in the plane-wave basis as

K_GG' = sum_ab  fac_a(q+G)*  FT[c_ab](G-G')  fac_b(q+G')

over generated coefficient fields, lifting the fxc(G-G') locality restriction. The calculator subclasses AdiabaticFXCCalculator to reuse the dG unfolding and enters the Dyson equation through the standard PWKernel interface, so DielectricFunction(..., xc='APBE') works through the existing API. PAW corrections inside the augmentation spheres are included.

Validation

Check System Result
Analytic vs finite-difference K matrix, singlet H₂O / PBE max 1×10⁻⁷ eV over 12 transitions (FD truncation floor)
Triplet smooth elements vs antisymmetric-perturbation FD H₂O / PBE 4×10⁻⁷ over the full domain
Triplet smooth elements vs antisymmetric-perturbation FD H₂O / TPSS 2.5×10⁻⁷, iso-orbital kink regions excluded from the FD reference
Plane-wave kernel vs brute-force real-space matrix elements bulk Si / PBE ~1×10⁻¹⁷ relative
ALDA-with-PAW vs GPAW's LocalPAWFTCalculator pipeline bulk Si 3×10⁻¹⁸ relative
Exact LDA-limit identity vs FXCKernel unfolding bulk Si machine precision

The TPSS exclusion is a limitation of the finite-difference reference, not of the kernels: TPSS-type functionals are only piecewise smooth at iso-orbital points, where the analytic derivatives remain well defined but a finite difference does not. Static dielectric constants on a coarse 4×4×4 grid: ε = 13.22 (RPA) / 13.99 (ALDA) / 14.55 (APBE).

Scope and limitations

  • The dielectric-function kernels are spin-paired and LDA/GGA. The tau channel additionally requires kinetic pair-density response functions in the Dyson solver, which is host-side plumbing outside the kernel layer and is deliberately not part of this MR.
  • lrtddft2 PAW corrections retain the finite-difference route, which is tau-aware through the D_sp reconstruction of the radial tau; the triplet PAW corrections use a spin-resolved antisymmetric two-spin finite difference.
  • Libxc derivative arrays are obtained through pylibxc.

Files

 gpaw/lrtddft2/__init__.py           |  10 +-
 gpaw/lrtddft2/k_matrix.py           | 228 +++++++++++++-
 gpaw/response/density_kernels.py    |  13 +-
 gpaw/response/semilocal_kernels.py  | 273 ++++++++++++++++
 gpaw/xckernel_fxc.py                | 448 +++++++++++++++++++++++++++
 5 files changed, 964 insertions(+), 8 deletions(-)

gpaw/xckernel_fxc.py is generated; the other four are hand-written integration.

Described in a manuscript on libxckernel (in preparation). The corresponding Psi4 integration is psi4/psi4#3458.

Merge request reports

Loading
Loading