Fast, Modular, and Differentiable Framework for Machine Learning-Enhanced Molecular Simulations

Henrik Christiansen, Takashi Maruyama, Federico Errica, Viktor Zaverkin, Makoto Takamoto +1 more
3/26/2025
physics.comp-phcond-mat.stat-mechcs.LG

Official code: nec-research/DIMOS (32 stars, PyTorch, last commit 2025-11-11).

Abstract

We present an end-to-end differentiable molecular simulation framework (DIMOS) for molecular dynamics and Monte Carlo simulations. DIMOS easily integrates machine-learning-based interatomic potentials and implements classical force fields including an efficient implementation of particle-mesh Ewald. Thanks to its modularity, both classical and machine-learning-based approaches can be easily combined into a hybrid description of the system (ML/MM). By supporting key molecular dynamics features such as efficient neighborlists and constraint algorithms for larger time steps, the framework makes steps in bridging the gap between hand-optimized simulation engines and the flexibility of a \verb|PyTorch| implementation. We show that due to improved linear instead of quadratic scaling as function of system size DIMOS is able to obtain speed-up factors of up to $170\times$ for classical force field simulations against another fully differentiable simulation framework. The advantage of differentiability is demonstrated by an end-to-end optimization of the proposal distribution in a Markov Chain Monte Carlo simulation based on Hamiltonian Monte Carlo (HMC). Using these optimized simulation parameters a $3\times$ acceleration is observed in comparison to ad-hoc chosen simulation parameters. The code is available at https://github.com/nec-research/DIMOS.

View on arXivView PDF

Code Implementations(1)

nec-research/DIMOSOfficial100%
PyTorch

DIfferentiable MOlecular Simulator (DIMOS): A pyTorch based framework for machine-learning enhanced simulations

323Python, Jupyter NotebookMar 26, 202511 months agoNOASSERTION
molecular-dynamicsmolecular-simulationmonte-carlo-simulationpytorch

Similar Papers

Cite this paper

@article{christiansen2025fast,
  title  = {Fast, Modular, and Differentiable Framework for Machine Learning-Enhanced Molecular Simulations},
  author = {Henrik Christiansen and Takashi Maruyama and Federico Errica and Viktor Zaverkin and Makoto Takamoto and Francesco Alesiani},
  year   = {2025},
  eprint = {2503.20541},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2503.20541v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2503.20541.svg)](https://codeofpaper.com/paper/2503.20541)

Discussion