Implementation of Girsanov Reweighting in OpenMM and Deeptime

Joana-Lysiane Schäfer,Bettina G. Keller
DOI: https://doi.org/10.1021/acs.jpcb.4c01702
IF: 3.466
2024-06-13
The Journal of Physical Chemistry B
Abstract:Classical molecular dynamics (MD) simulations provide invaluable insights into complex molecular systems but face limitations in capturing phenomena occurring on time scales beyond their reach. To bridge this gap, various enhanced sampling techniques have been developed, which are complemented by reweighting techniques to recover the unbiased dynamics. Girsanov reweighting is a reweighting technique that reweights simulation paths, generated by a stochastic MD integrator, without evoking an...
chemistry, physical
What problem does this paper attempt to address?
### Problems Addressed by the Paper The paper aims to address the limitations of classical molecular dynamics (MD) simulations in capturing long-time scale phenomena. Specifically, it proposes a technique called Girsanov reweighting to recover unbiased dynamics from simulations with biased potential energy. This method does not assume an effective model of molecular dynamics but directly recalculates path probability densities at the level of the stochastic MD integrator. ### Background and Motivation 1. **Limitations of Classical Molecular Dynamics**: - Classical MD simulations provide valuable insights into complex molecular systems but struggle to capture phenomena beyond their time scales, such as slow conformational changes, complex formation processes, and chemical reactions. - These relevant time scales are often several orders of magnitude longer than those covered by classical MD simulations. 2. **Enhanced Sampling Techniques**: - To bridge this time scale gap, various enhanced sampling techniques have been developed, which can be broadly categorized as follows: - Changing the system's temperature. - Altering the system's classical Hamiltonian, particularly the potential energy function. - Biasing the initial state of trajectories without changing their dynamics. 3. **Reweighting Methods**: - Enhanced sampling techniques require reweighting methods to recover undisturbed static densities and dynamics from biased simulations. - Girsanov reweighting is a dynamic reweighting technique that can recover unbiased dynamics of molecular systems from simulations with biased potential energy. ### Features of Girsanov Reweighting - **Accuracy**: - Girsanov reweighting does not assume an effective model of molecular dynamics but directly recalculates path probability densities at the level of the stochastic MD integrator. - Therefore, it is an accurate reweighting technique. - **Application Range**: - The method has been applied to model systems and peptide dynamics. - Recently, it has been used for machine learning of optimal collective variables based on enhanced sampling simulations. ### Implementation Goals - **Efficient Implementation**: - The paper provides a comprehensive guide on how to integrate the Girsanov reweighting technique into MD simulations. - Specifically, the authors demonstrate how to implement this technique in the OpenMM MD simulation package by extending the openmmtools library. - Additionally, they have implemented a weighted Markov state model estimator in the time series analysis package Deeptime. - **Practical Applications**: - By obtaining MD trajectories from a reference potential energy function, one can calculate transition rates under a modified potential energy function and study the sensitivity of these transition rates to certain parameters of the potential energy function. - This is useful for optimizing potential energy functions to reproduce specific transition rates. ### Method Overview 1. **Calculation of Path Probability Densities**: - Calculate the path reweighting factor in real-time during the simulation, which requires access to the random numbers and biased forces at each MD integration step. - By decomposing the path reweighting factor into the product of two factors, path probability densities can be calculated efficiently. 2. **Reweighting of Markov State Models**: - Re-estimate the transition matrix of the Markov state model using the path reweighting factor. - By calculating the cumulative value of the path reweighting factor, one can obtain the conditional reweighting factor of the path and multiply it by the relative probability density of the path's initial state. 3. **Implementation in OpenMM**: - Implement Girsanov reweighting in OpenMM by creating a new LangevinSplittingGirsanov class. - This class inherits from the LangevinIntegrator class and automatically sets the relevant variables and methods. - The random number difference Δηl,k is implemented through a dispatch table, which can be calculated according to different update operators. ### Conclusion The paper provides a detailed implementation guide, demonstrating how to efficiently implement the Girsanov reweighting technique in OpenMM and Deeptime. This technique not only helps recover unbiased dynamics from simulations with biased potential energy but also provides a means to optimize potential energy functions and study the dynamic properties of molecular systems.