diff --git a/doc/group2ndx.txt b/doc/group2ndx.txt index d40d4399f..208d1fc85 100644 --- a/doc/group2ndx.txt +++ b/doc/group2ndx.txt @@ -1,51 +1,64 @@ "LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line group2ndx command :h3 +ndx2group command :h3 [Syntax:] -group2ndx file group-ID ... :pre +group2ndx file group-ID ... +ndx2group file group-ID ... :pre -file = name of index file to write out :ulb,l +file = name of index file to write out or read in :ulb,l zero or more group IDs may be appended :l :ule [Examples:] group2ndx allindex.ndx -group2ndx someindex.ndx upper lower mobile :pre +group2ndx someindex.ndx upper lower mobile +ndx2group someindex.ndx +ndx2group someindex.ndx mobile :pre [Description:] -Write a Gromacs style index file in text format that associates atom IDs -with the corresponding group definitions. This index file can be used -with in combination with Gromacs analysis tools or to import group -definitions into the "fix colvars"_fix_colvars.html input file. +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 +used with in combination with Gromacs analysis tools or to import group +definitions into the "fix colvars"_fix_colvars.html input file. It can +also be used to save and restore group definitions for static groups. +The {group2ndx} command will write group definitions to an index file. Without specifying any group IDs, all groups will be written to the index file. When specifying group IDs, only those groups will be written to the index file. In order to follow the Gromacs conventions, the group {all} will be renamed to {System} in the index file. +The {ndx2group} command will create of update group definitions from those +stored in an index file. Without specifying any group IDs, all groups except +{System} will be read from the index file and the corresponding groups +recreated. If a group of the same name already exists, it will be completely +reset. When specifying group IDs, those groups, if present, will be read +from the index file and restored. + :line [Restrictions:] This command requires that atoms have atom IDs, since this is the information that is written to the index file. -This fix is part of the USER-COLVARS package. It is only enabled if -LAMMPS was built with that package. See the "Making +These commands are part of the USER-COLVARS package. They are only +enabled if LAMMPS was built with that package. See the "Making LAMMPS"_Section_start.html#start_3 section for more info. [Related commands:] "group"_group.html, "dump"_dump.html, "fix colvars"_fix_colvars.html [Default:] none