Fast and flexible long-range models for atomistic machine learning
Philip Loche, Kevin K. Huguenin-Dumittan, Melika Honarmand, Qianjun Xu, Egor Rumiantsev, Wei Bin How, Marcel F. Langer, Michele Ceriotti · 2024
Read Fast and flexible long-range models for atomistic machine learning by Philip Loche, Kevin K. Huguenin-Dumittan, Melika Honarmand, Qianjun Xu, Egor Rumiantsev, Wei Bin How, Marcel F. Langer, Michele Ceriotti (2024) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2412-03281.txt.
Introduction
Philip Loche and seven co-authors speed long-range forces in atom models in a 2024 paper. Most atom learning tools split a system's energy into short-range, atom-led parts. That split fails when far-off pulls rule, above all the pull of electric charge across a whole sample.
Known fixes for far pulls exist, but each needs its own hand-built code, which slows their spread. The team built a frame that runs the classic far-pull sums inside learning tools with no ad hoc work. Their frame keeps the sums fast and bends to many tasks, a step toward sound far-pull atom models for all.
Catalog record
| CREATOR | Philip Loche, Kevin K. Huguenin-Dumittan, Melika Honarmand, Qianjun Xu, Egor Rumiantsev, Wei Bin How, Marcel F. Langer, Michele Ceriotti |
|---|---|
| YEAR | 2024 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 65 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2412-03281
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Fast and flexible long-range models for atomistic machine learning Philip Loche, Kevin K. Huguenin-Dumittan, Melika Honarmand, Qianjun Xu, Egor Rumiantsev, Wei Bin How, Marcel F. Langer, Michele Ceriotti Abstract Most atomistic machine learning (ML) models rely on a locality ansatz, and decompose the energy into a sum of short-ranged, atom-centered contributions. This leads to clear limitations when trying to describe problems that are dominated by long-range physical effects – most notably electrostatics. Many approaches have been proposed to overcome these limitations, but efforts to make them efficient and widely available are hampered by the need to incorporate an ad hoc implementation of methods to treat long-range interactions. We develop a framework aiming to bring some of the established algorithms to evaluate non-bonded interactions – including Ewald summation, classical particle-mesh Ewald (PME), and particle-particle/particle-mesh (P3M) Ewald – into atomistic ML. We provide a reference implementation for PyTorch as well as an experimental one for JAX . Beyond Coulomb and more general long-range potentials, we introduce purified descriptors which disregard the immediate neighborhood of each atom, and are more suitable for general long-ranged ML applications. Our implementations are fast, feature-rich, and modular: They provide an accurate evaluation of physical long-range forces that can be used in the construction of (semi)empirical baseline potentials; they exploit the availability of automatic differentiation to seamlessly combine long-range models with conventional, local ML schemes; and they are sufficiently flexible to implement more complex architectures that use physical interactions as building blocks. We benchmark and demonstrate our torch-pme and jax-pme libraries to perform molecular dynamics simulations, to train multiscale ML potentials, and to evaluate long-range equivariant descriptors of atomic structures. I Introduction Machine learning (ML) has become essential in atomistic simulations, especially as a surrogate for quantum mechanical methods like density functional theory (DFT). Early works by Behler and Parrinello Behler and Parrinello 2007 and Bartók et al. Bartók et al. 2010 demonstrated that ML models are able to predict the energy and forces of an atomic structure at close to DFT accuracy with significantly reduced computational cost. Since then, the field has rapidly expanded in many directions: On one hand, various architectures including kernel-based approaches Bartók et al. 2010 ; Rupp et al. 2012 ; Schütt et al. 2018 and message-passing neural networks have emerged to further improve accuracy and efficiency Schütt et al. 2017 ; Klicpera et al. 2020 ; Zhang et al. 2018 ; Thomas et al. 2018 ; Musaelian et al. 2023 . Furthermore, beyond just the energy or other rotationally invariant target properties, the field has seen the rise of equivariant model architectures that can also handle tensorial target properties such as dipoles and polarizabilities Glielmo, Sollich, and De Vita 2017 ; Grisafi et al. 2018 ; Wilkins et al. 2019 , the electron density Brockherde et al. 2017 ; Fabrizio et al. 2019 ; Lewis et al. 2021 , the Hamiltonian operator Schütt et al. 2019 ; Cignoni et al. 2024 and many-particle wavefunctions Carleo and Troyer 2017 ; Hermann, Schätzle, and Noé 2020 ; Unke et al. 2021a . Thanks to the mathematical field of representation theory, there is now a systematic understanding about how to incorporate any type of behavior under rotations in ML models Fulton and Harris 1991 ; Serre 1977 ; Tinkham 2003 . Despite these advancements, a persistent limitation in many of the ML models is the use of finite cutoff radii, which had been justified in terms of the “nearsightedness of electronic matter” Kohn 1996 ; Prodan and Kohn 2005 . While this allows for efficient methods with computational costs that scale linearly with the number of atoms, the trade-off is the introduction of systematic errors in scenarios where long-range interactions play a crucial role. For instance, electrostatic interactions from the direct Coulomb potential to induced multipolar interactions are critical in ionic and polar materials, affecting dielectric constants, phonon spectra, and structural stability Fennell and Gezelter 2006 ; Born and Huang 1954 ; Jackson 1998 . Dispersion (van der Waals) forces are equally vital in layered materials, molecular crystals and interfaces, as they contribute to cohesion and adhesion energies Grimme 2006 ; Tkatchenko and Scheffler 2009 ; DiStasio, Gobre, and Tkatchenko 2014 . Ignoring these interactions in ML models restricts their applicability. This work presents libraries for the PyTorch and JAX frameworks that implement efficient methods for computing a family of long-range features as well as classical long-range energy corrections in an automatically differentiable manner. Due to the use of popular and flexible ML libraries, the features can easily be integrated into any pre-existing ML framework for invariant and equivariant target properties, with or without gradients. In section II , we begin by providing an overview of the scientific background concerning algorithms for long-range electrostatics developed by the molecular dynamics (MD) community, as well as long-ranged ML methods. In section III , we discuss some of the specific technical choices and the core features of our implementation. In section IV , we demonstrate and benchmark our reference torch-pme implementation in several different use cases, providing also some comparisons with its more experimental jax-pme companion. II Background Long-range interactions are not new to ML, and have in fact already been studied extensively since the outset of traditional atomistic simulations. Here we briefly summarize the key ideas. II.1 Notation and Conventions In this subsection, we focus on the Coulomb potential, and define the bare potential function \displaystyle v(r)=\frac{1}{r} (1) for r\in(0,\infty) , even though the general setting of the problem applies to any pair potential, and we will discuss a few concrete cases of other 1/r^{p} -type interactions for more general exponents p>0 . In a system of N atoms with positions \mathbf{r}_{i}\in\mathbb{R}^{3} and weights (charges) q_{i} for i=1,\dots,N , the Coulomb potential V_{i} at the location of an atom i and the total energy E of the system can be defined as \displaystyle V_{i} \displaystyle=\frac{1}{2}\sum_{j\neq i}q_{j}v(r_{ij}) (2) \displaystyle E \displaystyle=\sum_{i=1}^{N}q_{i}V_{i}\,, (3) where r_{ij}=\|\mathbf{r}_{i}-\mathbf{r}_{j}\| is the distance between atoms i and j , and we also include the factor of 1/2 to account for double-counting directly in the definition of V_{i} . We can extend the atomic potentials to periodic systems by also including all interactions with periodic images of the atoms. Thus, \displaystyle V_{i}=\frac{1}{2}\sum_{j=1}^{N}\sideset{}{{}^{\prime}}{\sum}_{\mathbf{l}}q_{j}v\left(\|\mathbf{r}_{i}-\mathbf{r}_{j}-\mathbf{l}\|\right)\,,w (4) where \mathbf{l} runs over the lattice vectors of the periodic cell. The sum over j also includes i=j in the periodic case to take into account the interactions between atom i and its own periodic images. For this special case of i=j , the prime symbol in the second summation sign indicates that the term with \mathbf{l}=0 must be omitted to avoid the singularity in v as r\rightarrow 0 . While conceptually straight-forward, this definition of the potential in periodic space is problematic for the Coulomb potential since its slow decay makes the sum over \mathbf{l} conditionally convergent. A naive implementation (such as spherical summation) does not even converge Borwein et al. 2013 . II.2 Ewald Summation Ewald summation, published in 1921, remains a foundational method that effectively defines how to extend this computation to periodic systems Ewald 1921 . The proposed solution is to perform a range separation of the Coulomb potential: We write \displaystyle v(r) \displaystyle=v_{\mathrm{SR}}(r)+v_{\mathrm{LR}}(r) (5) \displaystyle v_{\mathrm{SR}}(r) \displaystyle=\frac{\mathrm{erfc}\left(\frac{r}{\sqrt{2}\sigma}\right)}{r}