Automatic generation of exchange-correlation response kernels
Susi Lehtola
Abstract
Computing density-functional response properties requires contracting derivatives of the exchange--correlation (xc) energy with perturbed densities on a grid. While the xc functional's derivatives have long been available to high orders from libraries such as Libxc, the surrounding contraction layer - the chain rule that combines them with the grid-based basis-function and density data into the total xc contribution - has instead been hand-derived and hand-coded in every program, for every functional family, spin case, and property. We present libxckernel, a library that automatically generates this layer by symbolic differentiation. The xc functional's ingredients are expressed as sesquilinear forms in the density matrix, so the xc energy can be differentiated to any order while the functional derivatives remain opaque. The basis functions and the orbital coefficients may both be complex. The chain rule then produces any xc matrix element: Fock matrices, orbital Hessians, and response terms of any order. Terms sharing a pattern are collapsed for efficiency. Extensible plugins emit the expressions as NumPy Einstein sums, compiled C kernels with C++/Fortran interfaces, or host-program specific source code. libxckernel is free and open-source software under the BSD-3-Clause license, enabling rapid implementation of functionality missing from many electronic structure programs. We demonstrate it by extending Psi4 with meta-generalized gradient approximation (mGGA) response kernels for orbital stability analysis and time-dependent density-functional theory (TD-DFT), GGA and mGGA analytic nuclear Hessians, and exact quadrature grid response, and by extending GPAW with mGGA and triplet TD-DFT kernels and gradient-corrected kernels for periodic dielectric response.
Create a lesson
Related papers
A unified gas-kinetic wave-particle method for multiscale gas-mixture flow with an elementary chemical reaction
Cao Junzhe, Wei Yufeng, Long Wenpei et al.
Energy Yield and Lifetime Climate Classification via Machine Learning for Optimizing Photovoltaic Module Design and Materials
Youri Blom, Sofia Dutto, Alexandru Costache et al.
Rapidly Convergent Finite-Element Domain Decomposition Method With Two-Channel Transmission Conditions
Furkan Şık, Fernando L. Teixeira, Balasubramaniam Shanker
A sharp-diffuse interface model for intermittent and isolated topological transitions
Raaghav Ramani
Macroparticles with different weights relax to different temperatures in Particle-In-Cell simulations
Remi Lehe, Arianna Formenti, Justin R. Angus et al.
First-Principles Electron-Magnon Coupling with Machine-Learning Hamiltonians: From Band Renormalization to Transport
Shixu Liu, Xingding Li, Haozhe Li et al.