Stress and heat flux via automatic differentiation
Marcel F. Langer, J. Thorben Frank, Florian Knoop
TL;DR
This paper presents a unified automatic-differentiation framework to compute forces, stress, and heat flux for graph-based, semi-local, equivariant potentials, enabling efficient and scalable gradient calculations that are often challenging for complex many-body models. By formulating stress and heat flux in AD-friendly ways and offering unfolded and standard graph strategies, the authors achieve linear scaling and model-agnostic implementations, demonstrated on Lennard-Jones Argon and tin selenide with So3krates. The results show close agreement with analytical references and conventional baselines, while predicting cohesive properties and thermal conductivity that align with prior first-principles and experimental data, particularly for SnSe with higher interaction depth $M$. The work provides open-source tools (glp) and data to extend AD-enabled stress and heat-flux calculations to a broad class of graph-based ML potentials, accelerating MD and thermal transport studies in materials science.
Abstract
Machine-learning potentials provide computationally efficient and accurate approximations of the Born-Oppenheimer potential energy surface. This potential determines many materials properties and simulation techniques usually require its gradients, in particular forces and stress for molecular dynamics, and heat flux for thermal transport properties. Recently developed potentials feature high body order and can include equivariant semi-local interactions through message-passing mechanisms. Due to their complex functional forms, they rely on automatic differentiation (AD), overcoming the need for manual implementations or finite-difference schemes to evaluate gradients. This study demonstrates a unified AD approach to obtain forces, stress, and heat flux for such potentials, and provides a model-independent implementation. The method is tested on the Lennard-Jones potential, and then applied to predict cohesive properties and thermal conductivity of tin selenide using an equivariant message-passing neural network potential.
