Skip to main content

Unified Free Energy Dynamics with OpenMM

Linux MacOS Windows Linter Docs Coverage License

PyPI version Conda ufedmm version Conda ufedmm platforms Conda ufedmm downloads

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.

Extended Phase-Space Dynamics

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 Calculations

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).

Enhanced Sampling of Rare Events

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.

Methods and Algorithms

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.

Collective Variable Package (cvpack)

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.

Installation and Usage

UFEDMM is available on PyPI and as a conda package in the mdtools conda channel.

With conda:

    conda install -c conda-forge -c mdtools ufedmm

With pip:

    pip install ufedmm

To use UFEDMM in your own Python script or Jupyter notebook, import it as follows:

    import ufedmm

Documentation

https://craabreu.github.io/ufedmm/latest

Citing UFEDMM

If you use UFEDMM in published work, please cite:

S. Bajpai, B. K. Petkov, M. Tong, C. R. A. Abreu, N. N. Nair, and M. E. Tuckerman, "An interoperable implementation of collective-variable based enhanced sampling methods in extended phase space within the OpenMM package," J. Comput. Chem. 44(28), 2166–2183 (2023). doi:10.1002/jcc.27182

@article{bajpai2023,
  author  = {Bajpai, Shitanshu and Petkov, Brian K. and Tong, Muchen and Abreu, Charlles R. A. and Nair, Nisanth N. and Tuckerman, Mark E.},
  title   = {An interoperable implementation of collective-variable based enhanced sampling methods in extended phase space within the {OpenMM} package},
  journal = {Journal of Computational Chemistry},
  volume  = {44},
  number  = {28},
  pages   = {2166--2183},
  year    = {2023},
  doi     = {10.1002/jcc.27182},
}

This is an open-source (MIT licensed) project. Contribution is welcome.

Acknowledgements

Project structure based on the Computational Molecular Science Python Cookiecutter version 1.0.

Metadata

Release files for ufedmm 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ufedmm 0.4.0
File Size Uploaded Provenance Actions
ufedmm-0.4.0.tar.gz 64.5 kB Without provenance Details for ufedmm-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ufedmm 0.4.0
File Interpreter ABI Platform Actions
ufedmm-0.4.0-py3-none-any.whl Python 3 none any Details for ufedmm-0.4.0-py3-none-any.whl

Total release size: 133.9 kB

Release files / ufedmm-0.4.0.tar.gz

Download URL ufedmm-0.4.0.tar.gz
Size 64.5 kB
Tags Source
SHA-256 checksum
How to use checksums
cb0320a3cafe02d73e4ac9a05199382333948bb91a0fb0c15f381f94c46b9f66
BLAKE2b-256 checksum
How to use checksums
39974a1c3331181a18962dffe0da11c0f5c8bba427f26c1ec6fd34490538010f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Release files / ufedmm-0.4.0-py3-none-any.whl

Download URL ufedmm-0.4.0-py3-none-any.whl
Size 69.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a7c9ea5a1fe96e3996e51bfae2a247c942b598026385e26df00a40c76477d0f0
BLAKE2b-256 checksum
How to use checksums
2b494d7a1bb4110d2b47630756d0d865b0d914fb6ffa65c851283fe1285e782c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.17

Security for ufedmm 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page