Abstract
Many biological processes occur on time scales longer than those accessible to molecular dynamics simulations. Identifying collective variables (CVs) and introducing an external potential to accelerate them is a popular approach to address this problem. In particular, PLUMED is a community-developed library that implements several methods for CV-based enhanced sampling. This chapter discusses two recent developments that have gained popularity in recent years. The first is the On-the-fly Probability Enhanced Sampling (OPES) method as a biasing scheme. This provides a unified approach to enhanced sampling able to cover many different scenarios: from free energy convergence to the discovery of metastable states, from rate calculation to generalized ensemble simulation. The second development concerns the use of machine learning (ML) approaches to determine CVs by learning the relevant variables directly from simulation data. The construction of these variables is facilitated by the mlcolvar library, which allows them to be optimized in Python and then used to enhance sampling thanks to a native interface inside PLUMED. For each of these methods, in addition to a brief introduction, we provide guidelines, practical suggestions and point to examples from the literature to facilitate their use in the study of the process of interest.
Introduction
Molecular dynamics (MD) simulations are indispensable tools for studying biological processes at the atomic level. However, many critical events, such as protein folding or ligand binding, occur on timescales far exceeding the nanosecond-to-microsecond range accessible to standard MD. To overcome this "rare event" problem, researchers employ enhanced sampling techniques. These methods typically involve identifying a few key degrees of freedom, known as Collective Variables (CVs), and applying an external biasing potential to accelerate transitions between metastable states.
This framework relies on the synergy between the PLUMED library for biasing and the mlcolvar library for data-driven CV discovery. Together, they provide a systematic pipeline for exploring complex energy landscapes.
The OPES Biasing Scheme
The On-the-fly Probability Enhanced Sampling (OPES) method represents a significant shift in biasing strategies. While traditional methods like Metadynamics focus on "filling" free energy wells, OPES aims to sample a predefined target probability distribution. This approach offers several variants tailored to specific research goals:
- OPES-Metad: Rapidly converges free energy surfaces with minimal parameter tuning.
- OPES-Explore: Optimized for discovering new metastable states, even when initial CVs are suboptimal.
- OPES-Expanded: Facilitates generalized ensemble simulations (e.g., multi-temperature).
- OPES-Flooding: Designed for the calculation of kinetic rates.
As illustrated above, applying a potential $V(s)$ results in a biased free energy surface $F(s) + V(s)$ that is significantly flatter than the original unbiased landscape (A). This reduction in barrier height ($\ddagger$) allows the system to transition between states that would otherwise be kinetically trapped.
Machine Learning Collective Variables with mlcolvar
Identifying effective CVs is often the bottleneck in enhanced sampling. The mlcolvar library addresses this by leveraging machine learning to learn CVs directly from simulation data. Built on PyTorch, it supports several architectures:
- Autoencoders: Unsupervised learning to compress high-dimensional atomic coordinates into a low-dimensional latent space.
- DeepTDA (Targeted Discriminant Analysis): Supervised learning to find coordinates that best separate known metastable states.
- DeepTICA: Identifies the slowest dynamical modes of the system by maximizing the autocorrelation of the learned variables.
The Iterative Pipeline and Interpretability
A core challenge in MD is the "chicken-and-egg" problem: good sampling requires good CVs, but finding good CVs requires sampling the transition events. The authors propose an iterative workflow where researchers first perform exploratory simulations (using OPES-Explore), use that data to train a neural network CV via mlcolvar, and finally run production simulations (using OPES-Metad) to obtain converged free energies.
To ensure these ML models are not "black boxes," the paper emphasizes interpretability tools like LASSO (sparse regression). This allows researchers to identify which specific physical descriptors—such as interatomic distances or dihedral angles—the neural network is actually using to describe the transition.
Conclusion
The combination of OPES and mlcolvar within the PLUMED ecosystem provides a robust, data-driven framework for studying complex molecular systems. By automating CV discovery and simplifying the biasing process, these tools enable researchers to move beyond intuition-based modeling toward systematic exploration of biological landscapes. Future developments, such as the integration of Graph Neural Networks (GNNs), promise to further reduce the reliance on human-defined descriptors by learning directly from raw atomic coordinates.
Summary updated