Abstract
Metadynamics is an enhanced sampling method of great popularity, based on the on-the-fly construction of a bias potential that is function of a selected number of collective variables. In order to improve its usability and convergence speed, we propose here a change in perspective that shifts the focus form the bias to the probability distribution reconstruction. The result is an enhanced sampling method that combine metadynamics and adaptive umbrella sampling approaches, taking the best from the two worlds. This new method has a straightforward reweighting scheme and allows for efficient importance sampling, avoiding uninteresting high free energy regions. Thanks to a compressed kernel density estimation it can handle a higher dimensional collective variable space, and does not require the prior knowledge of the boundaries of such space. The new method comes in two variants. The first aims at a quick convergence, avoiding oscillations and maximizing the quasi-static bias regime, while in the second the main focus is on a rapid exploration of the free energy landscape. We demonstrate the performance of the method in a number of representative examples.
Introduction
Molecular dynamics (MD) simulations are indispensable tools for studying the microscopic behavior of matter. However, many physical processes of interest, such as protein folding or chemical reactions, involve crossing high free-energy barriers. These "rare events" occur on timescales far beyond the reach of standard MD. Enhanced sampling methods like Metadynamics (MetaD) have been developed to address this by adding a history-dependent bias potential to the system's Hamiltonian, effectively "filling" the free-energy wells and encouraging the system to explore new configurations.
Despite its success, Metadynamics faces several challenges. It is highly sensitive to the choice of collective variables (CVs); suboptimal CVs can lead to slow convergence and large oscillations in the bias potential. Furthermore, reweighting the biased trajectory to obtain equilibrium properties can be complex, and the method can inadvertently push the system into unphysical high-energy regions.
The OPES Method: Shifting Focus to Probability
The authors introduce On-the-fly Probability Enhanced Sampling (OPES), a method that rethinks the fundamental approach of Metadynamics. Instead of focusing primarily on the construction of a repulsive bias potential, OPES shifts the focus to the reconstruction of the underlying unbiased probability distribution, $P(s)$, of the collective variables.
OPES utilizes Kernel Density Estimation (KDE) to estimate $P(s)$ on the fly. By defining a desired "target distribution"—such as a well-tempered distribution that reduces barriers by a specific factor—the method iteratively updates the bias to drive the simulation toward this target. This approach offers several technical advantages:
- Adaptive Bandwidth: Using Silverman’s rule of thumb, the width of the kernels (Gaussians) automatically shrinks as more data is collected, allowing for initial coarse exploration followed by fine-grained refinement.
- Kernel Compression: To maintain computational efficiency, an on-the-fly algorithm merges similar kernels, preventing the performance degradation typically seen in MetaD as the number of Gaussians grows.
- Explored-Space Normalization: By normalizing the bias only over the regions actually visited by the simulation, OPES avoids the "dimensionality curse" that often plagues probability-based sampling in high-dimensional spaces.
Results and Performance
The efficacy of OPES was demonstrated through several benchmarks, including alanine dipeptide and tetrapeptide in vacuum. A key observation is the rapid convergence of the free energy landscape.
As shown in the evolution of the alanine dipeptide simulation, the KDE-based approach allows the free energy estimate to stabilize much faster than the bias potential itself. This leads to a "quasi-static" bias regime, which significantly simplifies and stabilizes the reweighting process compared to standard Metadynamics.
In more complex systems, such as alanine tetrapeptide (biasing 6 dihedral angles simultaneously), OPES outperformed well-tempered Metadynamics. It explored the configuration space more efficiently and sampled transitions that MetaD struggled to reach, all while using a consistent set of input parameters. This robustness to parameters (update pace, initial bandwidth, and barrier height) makes OPES particularly accessible for non-experts.
Discussion and Conclusion
The core insight of OPES is that the free energy estimate obtained via reweighting often converges more robustly than the bias potential. By leveraging this estimate to define the bias, OPES creates a self-correcting feedback loop. The method effectively combines the strengths of Metadynamics and Adaptive Umbrella Sampling.
While the current work focuses on well-tempered target distributions, the OPES framework is flexible enough to accommodate various other targets. Future research will focus on applying OPES to larger, condensed-phase systems and exploring advanced bandwidth selection techniques to further enhance performance.
Summary updated