UFEDMM extends OpenMM's Python API so that the user can easily run efficient simulations in extended phase spaces, perform enhanced sampling of systems with barriers and rare events, and compute accurate free-energy surfaces for collective variables or reaction coordinates.
The concept of extended phase space is a powerful tool in Molecular Dynamics. It consists of treating arbitrary variables as coordinates of fictitious particles, assigning masses to these particles, and solving equations of motion that encode their interactions with the system molecules. Differently from collective variables, which are functions of atomic coordinates, these extra dynamical variables are independent ones. Together with their conjugate momenta, they add new dimensions to the system's phase space.
Free energy is an important thermodynamic property that quantifies the relative likelihood of different states of a system. UFEDMM uses extended phase-space dynamics to facilitate the calculation of free energy as a function of extra dynamical variables. Under certain assumptions, this is a suitable approximation for the free energy as a function of collective variables, also known as the potential of mean force (PMF).
UFEDMM combines two methods to efficiently overcome free-energy barriers. The TAMD/d-AFED method heats the extended variables to a higher temperature than the one specified for the molecules. The Metadynamics method floods free-energy basins with potential energy so that barriers are eventually smoothed out. This is the Unified Free Energy Dynamics (UFED) method: heating and flooding, all at once.
Interaction between a fictitious particle and the actual molecules is enacted by adding, to the total potential energy of the system, a new term that depends both on the corresponding dynamical variable and at least one collective variable. With OpenMM's CustomCVForce class, adding such a term is as simple as writing down a mathematical expression. All the low-level coding and compilation take place automatically in the background.
UFEDMM builds on the customization capability of OpenMM to enable efficient UFED simulations in GPUs and other parallel computation platforms. It is efficient because it makes OpenMM treat extra dynamical variables like normal atomic coordinates, thus avoiding the computational overhead of dealing with Context parameters.
TAMD/d-AFED is optionally enabled by assigning distinct temperatures to the molecules and the extra dynamical variables. For this, UFEDMM provides special CustomIntegrator subclasses, given that the intrinsic OpenMM integrators cannot handle multiple temperatures. Extended-space Metadynamics is enabled by explicitly defining the height and widths of Gaussian hills to be deposited over time, as well as the deposition period.
For the post-processing of UFED simulations, a free energy analysis tool is provided, which is based on mean-force estimation and radial basis set reconstruction of free energy (hyper)surfaces.
In OpenMM, a collective variable (CV) involved in a CustomCVForce is
nothing but an instance of some Force
subclass. The user is free to define any
CV for a UFED simulation. For convenience, though, UFEDMM provides access to
an external library of useful collective variables named
CVPack. It can be accessed via
the ufedmm.cvpack
module.
UFEDMM is available as a conda package installable from the mdtools conda channel. To install it, either run:
conda install -c conda-forge -c mdtools ufedmm
Or:
mamba install -c mdtools ufedmm
To use UFEDMM in your own Python script or Jupyter notebook, import it as follows:
import ufedmm
https://craabreu.github.io/ufedmm/
This is an open-source (MIT licensed) project. Contribution is welcome.
Project structure based on the Computational Molecular Science Python Cookiecutter version 1.0.