Git Product home page Git Product logo

ufedmm's Introduction

Unified Free Energy Dynamics with OpenMM

GitHub Actions Build Status GitHub Actions Build Status GitHub Actions Build Status GitHub Actions Build Status Coverage License

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

Documentation

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

Copyright

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.

ufedmm's People

Contributors

boscoh avatar craabreu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ufedmm's Issues

Travis CI Security Breach Notice

MolSSI is reaching out to every repository created from the MolSSI Cookiecutter-CMS with a .travis.yml file present to alert them to a potential security breach in using the Travis-CI service.

Between September 3 and September 10 2021, the Secure Environment Variables Travis-CI uses were leaked for ALL projects and injected into the publicly available runtime logs. See more details here. All Travis-CI users should cycle any secure variables/files, and associated objects as soon as possible. We are reaching out to our users in the name of good stewards of the third-party products we recommended and might still be in use and provide a duty-to-warn to our end-users given the potential severity of the breach.

We at MolSSI recommend moving away from Travis-CI to another CI provider as soon as possible. The nature of this breach and the way the response was mis-handled by Travis-CI, MolSSI cannot recommend the Travis-CI platform for any reason at this time. We suggest either GitHub Actions (as is used from v1.5 of the Cookiecutter-CMS) or some other service offered on GitHub.

If you have already addressed this security concern or it does not apply to you, feel free to close this issue.

This issue was created programmatically to reach as many potential end-users as possible. We do apologize if this was sent in error.

Installation script

Hi, I'm trying to install the package following these instructions that I found on read the docs
git clone https://github.com/craabreu/ufedmm.git
cd ufedmm
python setup.py install
However, there is no setup.py script on the repository. How should I install it?
Thanks

cvpack.HelixRMSDContent CV, RMSD computation error

Hi ,

I am trying to use helixRMSDContent() CV in ufedmm, defined under cvpack.

It is showing a number of particles mismatch error .

Code i used is as follows :

residues=list(pdb.topology.residues())
num_atoms=pdb.topology.getNumAtoms()
AH_RMSD=cvpack.HelixRMSDContent(residues[0:37],num_atoms)
system.AH_RMSD=ufedmm.CollectiveVariable('AH_RMSD',AH_RMSD)

error :
openmm.OpenMMException: RMSDForce: Number of reference positions does not equal number of particles in the System

Kindly have a look

Big jumps observed in extended particle coordinates, leading to NaN

Hi @craabreu ,
As discussed I've been running a few test systems. I came across a minimal example demonstrating a phenomenon where the extended particle coordinates occasionally jump a large distance (1 unit, being nanometers). Of course this leads to huge distortions in the system as it tries to catch up to the extended particle, which often causes a NaN.

The system is a charmm-gui lipid bilayer. The collective variables are simply x, y, and z coordinates of a sodium ion, made periodic since there is constant PBC. I track the value 1 integration step at a time, so at the bottom you can see that the extended particle coordinates jump first, shifting a large distance within the space of a single step.

The graph is in the notebok at https://github.com/ljmartin/tamd_jump , but here's a screen grab. Blue is the extended particle coordinates. The trajectory is also quite entertaining to watch on VMD or something.

Screenshot from 2020-08-10 13-42-00

The particular CV (x, y or z) that jumps seems to be stochastic, but in most cases you can see a huge jump in the extended particle, followed by the real CV trying to catch up.

And thanks for the library its been so useful !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.