Can I give an arbitrary name for an index?

GROMACS version: 2021
GROMACS modification: No
Here post your question

gmx make_ndx can create a customised index. For example, r 100-200 will create a new index for the atoms from residue 100 to 200, which is named as r_100-200 in the ndx file. But can I give it an arbitrary name, e.g. “Domain_A”, instead of “r_100-200”?

Yes, either edit the index file after the fact (it’s just plain text) or use the name command within make_ndx.

Thank you. I can edit the index file after make_ndx using a text editor.

But can I ask the syntax for "use the name command within make_ndx"? It seems that no information is here.

The documentation tells you to type ‘h’ at the prompt for examples, which returns (among other things):

'name' nr name    : rename group nr to name.

So if I want to change the name of group X to “mygroup” I would type:

name X mygroup

thank you, I got it!