Variational Coarse-Graining for Molecular Dynamics

Wujie Wang, Rafael Gómez-BombarelliarXiv 2018 · DOI · OpenReview

Abstract

Molecular dynamics simulations provide theoretical insight into the microscopic behavior of materials in condensed phase and, as a predictive tool, enable computational design of new compounds. However, because of the large temporal and spatial scales involved in thermodynamic and kinetic phenomena in materials, atomistic simulations are often computationally unfeasible. Coarse-graining methods allow simulating larger systems, by reducing the dimensionality of the simulation, and propagating longer timesteps, by averaging out fast motions. Coarse-graining involves two coupled learning problems; defining the mapping from an all-atom to a reduced representation, and the parametrization of a Hamiltonian over coarse-grained coordinates. Multiple statistical mechanics approaches have addressed the latter, but the former is generally a hand-tuned process based on chemical intuition. Here we present Autograin, an optimization framework based on auto-encoders to learn both tasks simultaneously. Autograin is trained to learn the optimal mapping between all-atom and reduced representation, using the reconstruction loss to facilitate the learning of coarse-grained variables. In addition, a force-matching method is applied to variationally determine the coarse-grained potential energy function. This procedure is tested on a number of model systems including single-molecule and bulk-phase periodic simulations.

Introduction

Molecular Dynamics (MD) simulations are a cornerstone of modern computational chemistry, yet their utility is often limited by the immense computational cost of simulating large systems over meaningful timescales. Coarse-Graining (CG) offers a solution by simplifying molecular representations—grouping clusters of atoms into single "beads." This reduction in dimensionality allows for larger timesteps and longer simulations.

Historically, CG has been a two-stage process. First, researchers manually define a mapping from the atomistic to the coarse-grained space, often relying on chemical intuition. Second, they parameterize a potential energy function to describe bead interactions. However, manual mapping is frequently sub-optimal and can obscure critical slow collective motions. This work introduces Autograin, a deep learning framework that treats coarse-graining as a variational optimization problem, simultaneously learning both the mapping and the potential.

Methodology: The Autograin Framework

Autograin leverages an auto-encoder architecture to automate dimensionality reduction. The framework consists of three primary components:

  1. The Encoder ($E$): This component maps high-resolution atomistic coordinates ($x_t$) to low-resolution CG coordinates ($z$). To ensure physical interpretability, the mapping must be discrete (assigning specific atoms to specific beads). The authors employ a Gumbel-Softmax layer, which allows for "hard" assignments while maintaining differentiability for gradient-based training.
  2. The Decoder ($D$): The decoder attempts to reconstruct the original atomistic positions from the latent CG representation. The reconstruction loss ($L_{AE}$) ensures that the chosen CG mapping retains maximum structural information.
  3. Force-Matching: To learn the physics of the CG system, the model minimizes the difference between the forces calculated from the learned CG potential ($V_{CG}$) and the mean forces observed in the all-atom simulation ($L_{inst}$).
Autograin architecture schematic showing the auto-encoder framework and loss functions.

By combining these losses, Autograin variationally determines the optimal mapping and potential energy function in a single training pipeline.

Results and Discussion

The framework was validated on several systems, ranging from single molecules in vacuum to bulk-phase liquids.

Automated Mapping Discovery

For small molecules like Ortho-terphenyl (OTP) and Aniline, Autograin successfully "discovered" chemically intuitive mappings. For instance, in OTP, the model naturally grouped phenyl rings into individual beads. The CG mappings evolve from a noisy initial state to a structured, sparse assignment over training time. This demonstrates that the model can replicate human-like chemical intuition purely through data-driven optimization.

Evolution of CG mappings during training and structural recovery for OTP and Aniline.

Structural Fidelity

The accuracy of the learned models was assessed by comparing structural distributions (bonds, angles, and pair correlations) between the CG simulations and the ground-truth all-atom data. In liquid methane and ethane, the CG models produced pair correlation functions nearly identical to the expensive atomistic simulations. For OTP, the probability densities for various structural parameters show excellent agreement between the CG and atomistic representations, confirming that the information bottleneck of the auto-encoder does not sacrifice critical structural fidelity.

The Accuracy-Transferability Trade-off

The study explored different potential energy functions, including classical harmonic potentials and Neural Network Potentials (SchNet). While SchNet achieved superior structural recovery, classical potentials offered better transferability across different thermodynamic states. This highlights a key design choice in CG modeling: the balance between capturing complex many-body correlations and maintaining generalizability.

Conclusion

Autograin represents a significant step toward fully automated coarse-graining. By unifying mapping and potential learning within a variational framework, it removes the need for manual tuning and ensures that the reduced representation is optimized for both structural reconstruction and physical accuracy. Future work may explore probabilistic decoders to better capture thermodynamic fluctuations (back-mapping) and graph-based architectures to automatically discover system topology.

Summary updated

Abstract

Molecular dynamics simulations provide theoretical insight into the microscopic behavior of materials in condensed phase and, as a predictive tool, enable computational design of new compounds. However, because of the large temporal and spatial scales involved in thermodynamic and kinetic phenomena in materials, atomistic simulations are often computationally unfeasible. Coarse-graining methods allow simulating larger systems, by reducing the dimensionality of the simulation, and propagating longer timesteps, by averaging out fast motions. Coarse-graining involves two coupled learning problems; defining the mapping from an all-atom to a reduced representation, and the parametrization of a Hamiltonian over coarse-grained coordinates. Multiple statistical mechanics approaches have addressed the latter, but the former is generally a hand-tuned process based on chemical intuition. Here we present Autograin, an optimization framework based on auto-encoders to learn both tasks simultaneously. Autograin is trained to learn the optimal mapping between all-atom and reduced representation, using the reconstruction loss to facilitate the learning of coarse-grained variables. In addition, a force-matching method is applied to variationally determine the coarse-grained potential energy function. This procedure is tested on a number of model systems including single-molecule and bulk-phase periodic simulations.
BibTeX
@misc{wang2018variational,
  author = {Wujie Wang and Rafael Gómez-Bombarelli},
  title = {{Variational Coarse-Graining for Molecular Dynamics}},
  year = {2018},
  eprint = {1812.02706},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1812.02706},
}
Figure