Algorithmic differentiation for plane-wave DFT: materials design, error control and learning model parameters

Niklas Frederik Schmitz, Bruno Ploumhans, Michael F. Herbst

Published: 2025/9/9

Abstract

We present a differentiation framework for plane-wave density-functional theory (DFT) that combines the strengths of algorithmic differentiation (AD) and density-functional perturbation theory (DFPT). In the resulting AD-DFPT framework derivatives of any DFT output quantity with respect to any input parameter (e.g. geometry, density functional or pseudopotential) can be computed accurately without deriving gradient expressions by hand. We implement AD-DFPT into the Density-Functional ToolKit (DFTK) and show its broad applicability. Amongst others we consider the inverse design of a semiconductor band gap, the learning of exchange-correlation functional parameters, or the propagation of DFT parameter uncertainties to relaxed structures. These examples demonstrate a number of promising research avenues opened by gradient-driven workflows in first-principles materials modeling.