What is the file format of file provided with option -sf in gmx gangle/select/distance etc commands

GROMACS version: 2021.2
GROMACS modification: No
Here post your question
what is the file format of file provided with option -sf in gmx gangle/select/distance etc commands.

The entries in the file should be semicolon separated.
for example:
for -sf file.txt option,
file.txt can have entries:
7;8;9;10

where 7 8 9 10 are index groups provided with -n option.

Semicolon is important.

I spent almost 1 hour to find out this. This information is not given in the gromacs manual or anywhere else. Somehow I found out by trial and error. So adding question and answer, it will be helpful for others.


Yogesh

1 Like

For posterity, gmx help selections syntax returns this as the first item described:

A set of selections consists of one or more selections, separated by
semicolons. Each selection defines a set of positions for the analysis. Each
selection can also be preceded by a string that gives a name for the selection
for use in, e.g., graph legends. If no name is provided, the string used for
the selection is used automatically as the name.

For interactive input, the syntax is slightly altered: line breaks can also be
used to separate selections. \ followed by a line break can be used to
continue a line if necessary. Notice that the above only applies to real
interactive input, not if you provide the selections, e.g., from a pipe.

I point this out so that others can find this, and other very useful information.

1 Like