Package: pycgtool
PyCGTOOLGenerate 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},}InstallPyCGTOOL requires Python 3.6 or higher and may be installed using eitherpiporconda:pip install pycgtoolconda install -c conda-forge pycgtoolAlternatively, you may download a pre-packaged version for your operating system from thereleases pageon 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 viapiporcondashould be prefered in most cases.MDTraj on macOSOn 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 seeMDTraj/#1572.UsageInput 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.itpfiles.
Topology and trajectory files are processed usingMDTrajso most common formats are accepted.Example mapping and bond files are present in thetest/datadirectory.
The format of these files is described fully in thedocumentation page on file formats.For more information, seethe 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 thedocumentationor use:pycgtool -hGenerate a ModelTo generate a CG model from an atomistic simulation:pycgtool <topology file> <trajectory file> -m <MAP file> -b <BND file>Map OnlyTo 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>MaintainersJames Graham (@jag1g13)ContributingIf you experience problems using PyCGTOOL or wish to see a new feature added pleaseopen an issue.To help develop PyCGTOOL, you can create a fork of this repository, clone your fork and install PyCGTOOL in development mode usingPoetry:poetry installThis will result in an editable mode install (similar topip install -e .) along with all the necessary runtime and development dependencies.
Testing and linting is handled byTox- usetoxto 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.LicenseGPL-3.0© James Graham, University of Southampton