Skip to main content

Generate coarse-grained molecular dynamics models from atomistic trajectories.

Project description

PyCGTOOL

License Python package Documentation DOI PyPi Version Downloads

Generate coarse-grained molecular dynamics models from atomistic trajectories.

The aim of this project is to provide a tool to aid in parametrising coarse-grained (CG) molecular mechanics models. PyCGTOOL generates coarse-grained models from atomistic simulation trajectories using a user-provided mapping. Equilibrium values and force constants of bonded terms are calculated by Boltzmann Inversion of bond distributions collected from the input trajectory.

Alternatively map-only mode (behaving similarly to MARTINIZE) may be used to generate initial coordinates to use with existing CG topologies such as the MARTINI lipid models. For instance, a pre-equilibrated atomistic membrane may be used to create starting coordinates for a MARTINI membrane simulation.

PyCGTOOL makes it easy to test multiple variations in mapping and bond topology by making simple changes to the config files.

If you find PyCGTOOL useful, please cite our JCIM paper (https://doi.org/10.1021/acs.jcim.7b00096) and the code itself (https://doi.org/10.5281/zenodo.598143).

@article{Graham2017,
   author = {James A. Graham and Jonathan W. Essex and Syma Khalid},
   doi = {10.1021/acs.jcim.7b00096},
   issn = {1549-9596},
   issue = {4},
   journal = {Journal of Chemical Information and Modeling},
   month = {4},
   pages = {650-656},
   title = {PyCGTOOL: Automated Generation of Coarse-Grained Molecular Dynamics Models from Atomistic Trajectories},
   volume = {57},
   url = {https://pubs.acs.org/doi/10.1021/acs.jcim.7b00096},
   year = {2017},
}

Install

PyCGTOOL requires Python 3.6 or higher and may be installed using pip:

pip install pycgtool

Alternatively, you may download a pre-packaged version for your operating system from the releases page on GitHub. These pre-packaged versions include all dependencies and should be suitable in cases where you cannot install packages with pip. Warning: This installation method is not extensively tested - installing via pip should be prefered in most cases.

MDTraj on macOS

On some versions macOS, with some versions of the Clang compiler, MDTraj may fail to load GROMACS XTC simulation trajectories. If you encounter this issue, make sure you have the latest version of MDTraj.

For more information see MDTraj/#1572.

Usage

Input to PyCGTOOL is an atomistic simulation trajectory in the form of a topology (e.g. PDB, GRO, etc.) and a trajectory file (e.g. XTC, DCD, etc.), along with two custom files: MAP and BND. These files provide the atomistic-to-CG mapping and bonded topology respectively.

Example files are present in the test/data directory. The format of these files is described in the full documentation.

For more information, see the tutorial. It is important to perform validation of any new parameter set - a brief example is present at the end of the tutorial.

For a full list of options, see the documentation or use:

pycgtool -h

Generate a Model

To generate a CG model from an atomistic simulation:

pycgtool <topology file> <trajectory file> -m <MAP file> -b <BND file>

Map Only

To use PyCGTOOL to convert a set of atomistic simulation coordinates to CG coordinates:

pycgtool <topology file> -m <MAP file>

Or to convert a complete simulation trajectory:

pycgtool <topology file> <trajectory file> -m <MAP file>

Maintainers

James Graham (@jag1g13)

Contributing

If you experience problems using PyCGTOOL or wish to see a new feature added please open an issue.

To help develop PyCGTOOL, you can create a fork of this repository, clone your fork and install PyCGTOOL in development mode using Poetry:

poetry install

This will result in an editable mode install (similar to pip install -e .) along with all the necessary runtime and development dependencies. Testing and linting is handled by Tox - use tox to run the full test suite and linter as they are configured in the Continuous Integration pipeline.

When you're ready for your work to be merged, please submit a Pull Request.

License

GPL-3.0 © James Graham, University of Southampton

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycgtool-2.0.0b3.tar.gz (39.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pycgtool-2.0.0b3-py3-none-any.whl (41.7 kB view details)

Uploaded Python 3

File details

Details for the file pycgtool-2.0.0b3.tar.gz.

File metadata

  • Download URL: pycgtool-2.0.0b3.tar.gz
  • Upload date:
  • Size: 39.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.8.11 Linux/5.8.0-1039-azure

File hashes

Hashes for pycgtool-2.0.0b3.tar.gz
Algorithm Hash digest
SHA256 7f70c55fc0c00ddf54a6d1701e51b9b42aa930edbcbf5b2e4cfc642d577bf2ab
MD5 26af2785d8764bcb2b63d76c2bda18af
BLAKE2b-256 92658f815d3e49bc7109e329dcb69141337665d03f04c784fa7696ce222c3be1

See more details on using hashes here.

File details

Details for the file pycgtool-2.0.0b3-py3-none-any.whl.

File metadata

  • Download URL: pycgtool-2.0.0b3-py3-none-any.whl
  • Upload date:
  • Size: 41.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.8.11 Linux/5.8.0-1039-azure

File hashes

Hashes for pycgtool-2.0.0b3-py3-none-any.whl
Algorithm Hash digest
SHA256 1f5e5c1663d70a2fd5058df01675ead8f59177d2ebbd80e13baa92ceb63a3c47
MD5 d033c0ba6ed6d347bcd48c198d556a47
BLAKE2b-256 50fcb8e9c7171c88d522f89702365258e4b7de0580a51c5fba770e017a0938eb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page