Skip to content
Snippets Groups Projects
Verified Commit 75c5c43b authored by James Graham's avatar James Graham
Browse files

docs: update documentation with new usage

parent 81c6efcf
No related branches found
No related tags found
No related merge requests found
......@@ -16,13 +16,6 @@ For instance, a pre-equilibrated atomistic membrane may be used to create starti
PyCGTOOL makes it easy to test multiple variations in mapping and bond topology by making simple changes to the config files.
This version has several advantages over the original C++ implementation CGTOOL:
* PyCGTOOL is able to run anywhere the necessary library dependencies are available (all available from pip)
* Does not require that residues are present in contiguous sorted blocks
* May map multiple residues with a single pass
* Support for polymers such as DNA or proteins making use of GROMACS' pdb2gmx
* Much more automated testing ensures that regressions will be identified quickly
If you find this useful, please cite as:
```
Graham, J. (2017). PyCGTOOL, https://doi.org/10.5281/zenodo.598143
......@@ -44,7 +37,11 @@ For more information see [MDTraj/#1572](https://github.com/mdtraj/mdtraj/issues/
## Usage
Input to PyCGTOOL is GROMACS GRO and XTC files, 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](https://github.com/jag1g13/pycgtool/tree/master/test/data) directory. The format of these files is described in the [full documentation](https://pycgtool.readthedocs.io/en/master/index.html).
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](https://github.com/jag1g13/pycgtool/tree/master/test/data) directory.
The format of these files is described in the [full documentation](https://pycgtool.readthedocs.io/en/master/index.html).
For more information, see [the tutorial](https://pycgtool.readthedocs.io/en/master/tutorial.html).
It is important to perform validation of any new parameter set; a brief example is present at the end of the tutorial.
......@@ -58,19 +55,19 @@ pycgtool -h
To generate a CG model from an atomistic simulation:
```
pycgtool -g <GRO file> -x <XTC file> -m <MAP file> -b <BND file>
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 -g <GRO file> -m <MAP file>
pycgtool <topology file> -m <trajectory file>
```
Or to convert a complete simulation trajectory:
```
pycgtool -g <GRO file> -x <XTC file> -m <MAP file>
pycgtool <topology file> <trajectory file> -m <MAP file>
```
## Maintainers
......
......@@ -40,14 +40,14 @@ Basic Usage
-----------
PyCGTOOL requires four input files to generate a coarse-grained model:
-g GROMACS gro coordinate file
-x GROMACS xtc trajectory file
-m PyCGTOOL mapping definition file
-b PyCGTOOL bond definition file
- AA simulation topology file (e.g. PDB, GRO, etc.)
- AA simulation trajectory file (e.g. XTC, DCD, etc.)
- PyCGTOOL mapping definition file
- PyCGTOOL bond definition file
The program is called by::
pycgtool.py -g <GRO file> -x <XTC file> -m <MAP file> -b <BND file>
pycgtool <topology file> <trajectory file> -m <MAP file> -b <BND file>
Example mapping and bond definition files are present in the ``test/data`` directory. Their format is explained below.
......@@ -127,9 +127,6 @@ If no angles are defined for a molecule, PyCGTOOL will construct all angles from
C5 O5 C1 C2
O5 C1 C2 C3
Advanced Usage
--------------
......@@ -146,7 +143,7 @@ For full detail see: :doc:`mapping-only`.
This mode may be invoked by::
pycgtool.py -g <GRO file> -m <MAP file>
pycgtool <topology file> -m <MAP file>
Measure Only
......@@ -156,7 +153,7 @@ Measure-only mode may be used to aid in the testing of a coarse-grained model by
These bond measurements may be compared directly to those collected from the pseudo-coarse-grained trajectory used to generate the model.
This mode may be invoked by::
pycgtool.py -g <GRO file> -x <XTC file> -b <BND file>
pycgtool <topology file> <trajectory file> -b <BND file>
Advanced Options
......
......@@ -11,12 +11,10 @@ The main uses of the functionality are:
In order to perform the AA to CG mapping, a PyCGTOOL mapping file is required.
For guidance on the creation of this file see the full :doc:`tutorial`.
To perform a mapping from a single snapshot `.gro` file use the command::
To perform a mapping from a single snapshot file (e.g. PDB, GRO, etc.) use the command::
pycgtool.py -g <GRO file> -m <MAP file>
pycgtool <topology file> -m <MAP file>
To perform a mapping of a complete `.xtc` trajectory use the command::
To perform a mapping of a complete trajectory (e.g. XTC, DCD, etc.) use the command::
pycgtool.py -g <GRO file> -x <XTC file> -m <MAP file>
But note that mapping an entire trajectory requires that the optional dependency `MDTraj` is installed.
pycgtool <topology file> <trajectory file> -m <MAP file>
......@@ -72,7 +72,7 @@ Model Generation
The process of model generation after having created the mapping and bond definition files is automated by PyCGTOOL.
In the simplest case, a parameter set may be generated simply by passing the four input files to PyCGTOOL::
pycgtool.py -g ref.gro -x ref.xtc -m atenolol.map -b atenolol.bnd
pycgtool ref.gro ref.xtc -m atenolol.map -b atenolol.bnd
This will create two output files ``out.gro``, the mapped CG coordinates, and ``out.itp``, the calculated CG model parameters.
......@@ -111,7 +111,7 @@ Additionally, other methods of validation should be applied relevant to the clas
To compare the distribution of bonded terms, we must first rerun PyCGTOOL to generate samples of the bonded measurements.
For the atomistic reference simulation, this can be done by running::
pycgtool.py -g ref.gro -x ref.xtc -m atenolol.map -b atenolol.bnd --dump_measurements
pycgtool ref.gro ref.xtc -m atenolol.map -b atenolol.bnd --dump_measurements
PyCGTOOL will now output a sample of each measured bond length and angle (but since the reference trajectory is short, the target sample size is not met and all values are collected), in the files ``36KB_length.dat`` and ``36KB_angle.dat``.
......@@ -119,7 +119,7 @@ PyCGTOOL will now output a sample of each measured bond length and angle (but si
Since we will be collecting samples of the same measurements from the CG simulation, these files should be renamed to, for instance, `ref_length.dat` and `ref_angle.dat`.
Collect the same samples for the CG simulation using::
pycgtool.py -g md.gro -x md.xtc -b atenolol.bnd
pycgtool md.gro md.xtc -b atenolol.bnd
Since we provide a bond file, but not a mapping file, PyCGTOOL will know that this is intended to simply collect bond measurements and will automatically set the `dump_measurements` option to `True`.
Again, the files created will be called ``36KB_length.dat`` and ``36KB_angle.dat``.
......
all: pycgtool cgprepare em npt md samples rgyr
pycgtool:
../../pycgtool.py -g ref.gro -x ref.xtc -m atenolol.map -b atenolol.bnd
pycgtool ref.gro ref.xtc -m atenolol.map -b atenolol.bnd
cgprepare:
gmx solvate -cp out.gro -cs ../../data/water.gro -o solv.gro -radius 0.21
......@@ -21,10 +21,10 @@ md:
gmx mdrun -deffnm md -v
samples:
../../pycgtool.py -g ref.gro -x ref.xtc -m atenolol.map -b atenolol.bnd --advanced
pycgtool ref.gro ref.xtc -m atenolol.map -b atenolol.bnd --advanced
mv {36KB,ref}_length.dat
mv {36KB,ref}_angle.dat
../../pycgtool.py -g md.gro -x md.xtc -b atenolol.bnd
pycgtool md.gro md.xtc -b atenolol.bnd
comparesamples:
./average_columns.py ref_length.dat 36KB_length.dat
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment