Git Product home page Git Product logo

paratemp's Introduction

Build Status Coverage Status Code Health DOI License

ParaTemp Logo

A Python package for setup and analysis of parallel tempering and replica exchange molecular dynamics

This is a package with many tools, functions, and some classes for analyzing and running molecular dynamics trajectories. It is specifically designed for working with Replica Exchange Molecular Dynamics (Parallel Tempering, when the replicas are at different temperatures). It is, in-part, specialized for analyzing trajectories of TADDOL-catalyzed reactions, though most components are general.

Installing

To install, run:

git clone https://github.com/theavey/ParaTemp.git
cd ParaTemp
pip install -e .

or this should work using conda (based on this gist):

git clone https://github.com/theavey/ParaTemp.git
cd ParaTemp
conda install --yes --file requirements.txt
python setup.py install

Notes

All simulations have so far been from GROMACS, but with the powerful generality of MDAnalysis, that should not be a particular constraint for using many of the analysis components of this package.

This package depends on MDAnalysis, NumPy, pandas, panedr, and gromacswrapper. The dependencies are listed in requirements.txt. They all should be installable with conda or pip.

With recent updates to MDAnalysis, this should now be compatible with Python 2.7 and Python 3.4+. This is currently tested on Python 2.7 and 3.6.

paratemp's People

Contributors

jakemar5 avatar theavey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

paratemp's Issues

Take arbitrary args for GROMACS submission script function

The function should be able to take any dict arguments for either the SGE system or GROMACS. This should then be passed to some specific function. The specific keyword arguments should be put into this dict (if they're not already there), and passed to the sub-functions.

This is probably better than just taking a list or string arguments, though those could also be allowed with some type checking.

replace py with pathlib/pathlib2

The py packages recommends it not be used in any new code, so it should be replaced with the use of the very similar pathlib/pathlib2 packages.

Generalize `get_temperatures`

This should be fairly easy to do: just do regex to find numbers with arbitrary separators.

Could possibly just use numpy's or pandas' file importing functions.

`box-forced` deprecated as argument to `Axes.set_aspect`

I'm not sure what the equivalent argument is, but I would have to guess just box, as that is still a valid option.
I don't recall at this moment why box-forced was needed, but I think it had something to do with using shared axes.

Move functions in energy_histo to be more logical

At least the radius of gyration stuff doesn't really seem to make sense in a file named "energy_histo". There's also a function that uses that (make_rg_figures) that could be moved.

There may be others. I haven't checked at this point.

make 'bin' arguments to fes_2d clearer

When I think of 'bins', I generally think of number of bins in x and y, but that turns out to be named n_bins, and bins has to do with z-binning. This should likely be changed, or at least the order of the arguments should be changed to make n_bins appear first.

Specify mdanalysis version

This now claims python 3 compatibility, but that’s only true for mdanalysis 0.17+, so that version should be specified.

Make Universe.copy() work

Universe.copy() tries to run the subclass init before copying the trajectory which results in an error.
Adding a custom invocation of copy could fix this and could actually copy over the new elements added in this package.

Python 2/3 compatibility

Some of this code works (only?) with Python 2, other parts with Python 3. That's not good.

For my code, it should be fairly simple to make it work across versions, but some of this is because of the compatibility of imported code.
This should be documented well so it's clear to users what works with which Python.

More sensible defaults to `para_temp_setup.compile_tprs`

These defaults have worked fine for me for this one system, but there is no particularly good reason to have a default lowest temperature of 205 K, for example.

The default scaling exponent should also be removed. The number of replicas might be okay because 16 might be a somewhat common number of cores/threads per machine.

Make travis-ci use locally installed version

travis currently uses just the local code, but it would be better (and good practice) to make the code install locally and then run the tests on that code.

Two (main) steps as I see it now:

  • make the code installable
  • change the imports in the test code to use the installed version and not the local module
  • then, the top level should no longer need an __init__.py file.

make read_data and save_data defaults for Universe.calculate...

At least for me, I generally want to run these anyway, so it would make sense to make them run by default to save as much time as possible. I don't imagine it would change the memory usage that much.
Plus, if it's saved, it's much easier to read it back in later if the RAM needs to be freed.

Generalize REUniverse

As implemented, this is really focused on parallel tempering-type replica exchange (where the temperatures differ between the replicas).

It would be good to ask someone who does non-temperature replica exchange to figure out how it would be best to do the indexing.
There might be some other parameter that might be natural to index by.

At the very least, possibly temps could be renamed to index or similar, and made optional.
Then, there could be a new argument index_type possibly that if it is 'temp', the replica's temperatures can be set by index.

A `figures` members to Universe and save figures to it

figures should likely be a dict, and things that produce figures should save figures to it with some default name that is settable (for fes_2d for example, it could be something like fes_2d_{x}_{y} if x and y have string representations that are nice?).

Save distance definitions

When distances are defined, it might be good to save those definitions to a separate dict.
Then, they could be accessed to calculate the same thing for a different trajectory, or remind the user of how they were defined in case the name is ambiguous.

don't add '-cpi ...' if it's already there

In paratemp.para_temp_setup.extend_tprs, '-cpi' will be added even if it's already in the submission script, possibly crashing GROMACS.
This should be relatively easy to fix, just checking to see if it's already given in the line.

While you're at it, might be a good idea to do line.split('#') in case the end of the line is commented out.
I think that should work.

Integrate with coveralls

  • add pytest-cov and coveralls requirements
  • run coveralls after success
  • add coveralls badge to readme

Make class of group of replicas of a simulation

A lot of work has been done extended MDAnalysis universes as replicas, but it would be great to have an object that would be a set of replicas for a single simulation.
This could make creating and iterating over all replicas must easier and cleaner.

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.