update group2ndx/ndx2group docs
This commit is contained in:
@ -34,21 +34,54 @@ Description
|
|||||||
Write or read a Gromacs style index file in text format that associates
|
Write or read a Gromacs style index file in text format that associates
|
||||||
atom IDs with the corresponding group definitions. This index file can be
|
atom IDs with the corresponding group definitions. This index file can be
|
||||||
used with in combination with Gromacs analysis tools or to import group
|
used with in combination with Gromacs analysis tools or to import group
|
||||||
definitions into the :doc:`fix colvars <fix_colvars>` input file. It can
|
definitions into the :doc:`fix colvars <fix_colvars>` input file.
|
||||||
also be used to save and restore group definitions for static groups.
|
|
||||||
|
It can also be used to save and restore group definitions for static groups
|
||||||
|
using the individual atom IDs. This may be important if the original
|
||||||
|
group definition depends on a region or otherwise on the geometry and thus
|
||||||
|
cannot be easily recreated.
|
||||||
|
|
||||||
|
Another application would be to import atom groups defined for Gromacs
|
||||||
|
simulation into LAMMPS. When translating Gromacs topology and geometry
|
||||||
|
data to LAMMPS.
|
||||||
|
|
||||||
The *group2ndx* command will write group definitions to an index file.
|
The *group2ndx* command will write group definitions to an index file.
|
||||||
Without specifying any group IDs, all groups will be written to the index
|
Without specifying any group IDs, all groups will be written to the
|
||||||
file. When specifying group IDs, only those groups will be written to the
|
index file. When specifying group IDs, only those groups will be
|
||||||
index file. In order to follow the Gromacs conventions, the group *all*
|
written to the index file. In order to follow the Gromacs conventions,
|
||||||
will be renamed to *System* in the index file.
|
the group *all* will be renamed to *System* in the index file.
|
||||||
|
|
||||||
The *ndx2group* command will create of update group definitions from those
|
The *ndx2group* command will create of update group definitions from
|
||||||
stored in an index file. Without specifying any group IDs, all groups except
|
those stored in an index file. Without specifying any group IDs, all
|
||||||
*System* will be read from the index file and the corresponding groups
|
groups except *System* will be read from the index file and the
|
||||||
recreated. If a group of the same name already exists, it will be completely
|
corresponding groups recreated. If a group of the same name already
|
||||||
reset. When specifying group IDs, those groups, if present, will be read
|
exists, it will be completely reset. When specifying group IDs, those
|
||||||
from the index file and restored.
|
groups, if present, will be read from the index file and restored.
|
||||||
|
|
||||||
|
File Format
|
||||||
|
"""""""""""
|
||||||
|
|
||||||
|
The file format is equivalent and compatible with what is produced by
|
||||||
|
the `Gromacs make_ndx command <https://manual.gromacs.org/current/onlinehelp/gmx-make_ndx.html>`_.
|
||||||
|
and follows the `Gromacs definition of an ndx file <https://manual.gromacs.org/current/reference-manual/file-formats.html#ndx>`_
|
||||||
|
|
||||||
|
Each group definition begins with the group name in square brackets with
|
||||||
|
blanks, e.g. \[ water \] and is then followed by the list of atom
|
||||||
|
indices, which may be spread over multiple lines. Here is a small
|
||||||
|
example file:
|
||||||
|
|
||||||
|
.. code-block:: ini
|
||||||
|
|
||||||
|
[ Oxygen ]
|
||||||
|
1 4 7
|
||||||
|
[ Hydrogen ]
|
||||||
|
2 3 5 6
|
||||||
|
8 9
|
||||||
|
[ Water ]
|
||||||
|
1 2 3 4 5 6 7 8 9
|
||||||
|
|
||||||
|
The index file defines 3 groups: Oxygen, Hydrogen, and Water and the
|
||||||
|
latter happens to be the union of the first two.
|
||||||
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user