Ground and Excited State Gradients with End-to-End Differentiable Semiempirical Quantum Chemistry

17 October 2025, Version 1
This content is an early or alternative research output and has not been peer-reviewed by Cambridge University Press at the time of posting.

Abstract

Accurate and efficient gradients of molecular energy with respect to nuclear degrees of freedom are essential for geometry optimization and molecular dynamics, including simulations beyond the Born-Oppenheimer regime. A common approach involves deriving analytical formulas for new electronic-structure methods, which is often conceptually difficult and requires tedious coding. Here, we implement analytical, semi- numerical, and automatic differentiation (AD)-based gradient pathways for semiempirical Hamiltonian models in the PYSEQM software package, leveraging both GPU and CPU architectures. We further extend these capabilities to excited states calculated using the Configuration Interaction Singles and Time-Dependent Hartree-Fock ansätze. We benchmark wall time, peak memory usage, and accuracy across three molecular families of varying chemical complexity, including systems of up to a thousand atoms. For ground state simulations, analytical and AD gradients achieve near-identical GPU run times, while semi-numerical is slower on GPU but remains competitive on CPU. For excited states, analytical and a custom AD approach using implicit differentation show similar performance and low memory requirements, whereas gradients with full-AD are memory-limited. Accuracy of AD gradients is excellent across all tested systems aided by a quaternion-based diatomic-frame rotation for two-center quantities that ensures smooth energy surfaces. Overall, automatic differentiation emerges as a practical alter- native for analytic gradients in semiempirical quantum chemistry, offering high accuracy with modest memory overhead. Our results provide actionable guidance for selecting optimal gradient strategies in large-scale ground- and excited-state molecular dynamics simulations.

Keywords

automatic differentiation
differentiable programming
semiempirical methods
analytical gradients
GPU
excited state gradients

Supplementary materials

Title
Description
Actions
Title
Supporting Information
Description
Supporting information that shows data verifying the implementation of analytical gradients against finite-difference gradients, and wall time and peak memory benchmarking for higher excited states
Actions

Comments

Comments are not moderated before they are posted, but they can be removed by the site moderators if they are found to be in contravention of our Commenting and Discussion Policy [opens in a new tab] - please read this policy before you post. Comments should be used for scholarly discussion of the content in question. You can find more information about how to use the commenting feature here [opens in a new tab] .
This site is protected by reCAPTCHA and the Google Privacy Policy [opens in a new tab] and Terms of Service [opens in a new tab] apply.