Generate coarse-grained molecular dynamics models from atomistic trajectories.
Project description
PyCGTOOL
Generate coarse-grained molecular dynamics models from atomistic trajectories.
PyCGTOOL is a tool to aid in parametrising coarse-grained (CG) molecular mechanics models of small molecules, for example for simulations using the popular MARTINI model. It generates coarse-grained model parameters 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 CG membrane simulation.
PyCGTOOL makes it quick and 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 either pip
or conda
:
pip install pycgtool
conda install -c conda-forge 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 using one of the above methods.
Warning: This installation method is not extensively tested - installing via pip
or conda
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, please make sure you have the latest version of MDTraj installed.
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 which describe the CG model to be generated: mapping (.map
) and bonding (.bnd
).
These files provide the atomistic-to-CG mapping and bonded topology respectively and use a format similar to GROMACS .itp
files.
Topology and trajectory files are processed using MDTraj so most common formats are accepted.
Example mapping and bond files are present in the test/data directory. The format of these files is described fully in the documentation page on file formats.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pycgtool-2.0.0.tar.gz
.
File metadata
- Download URL: pycgtool-2.0.0.tar.gz
- Upload date:
- Size: 57.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.8.12 Linux/5.11.0-1028-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 308ce3ac6a2bd3d37d397cf47d5e5defc518754012eb757d3a7d46a8776c3826 |
|
MD5 | 3ded0bd4fef87b6cc12f5dbc05585940 |
|
BLAKE2b-256 | 0394d39ed9e821b09f4443ec7d488706ab52ce8e92fff2ed5e738e4e42f388da |
File details
Details for the file pycgtool-2.0.0-py3-none-any.whl
.
File metadata
- Download URL: pycgtool-2.0.0-py3-none-any.whl
- Upload date:
- Size: 57.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.8.12 Linux/5.11.0-1028-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 301e705b8be4512eae8e1949d2bba50d2cc538d065af40cdf680be75f0685a0b |
|
MD5 | 806d5fadff0b7b9e957ac198b6fbeab0 |
|
BLAKE2b-256 | f093e79bf9381c423e3d2f6a60654d2164d804e6125ff9dd5d2c80d947b484bb |