When running molecular dynamics simulations with GROMACS, especially for complex biomolecular systems, precise atom or residue selection is often critical. Whether you’re setting up pull groups, performing umbrella sampling, or analyzing specific regions of your system, custom index groups can save you time and enhance your control. But creating and managing these groups manually can be error-prone and tedious.
Enter SAMSON’s GROMACS Wizard: it offers a streamlined interface to define and manage custom index groups effortlessly, using either direct GROMACS selection syntax or the intuitive selection tools built into SAMSON itself. And the best part? You can do it before, during, or even after the preparation step.
Why custom index groups matter
GROMACS automatically generates standard index groups such as Protein, Water, and Ions. However, for advanced tasks like analyzing secondary structure dynamics, selecting ligand pocket residues, or tracking atom groups during simulations, you often need more granularity. Manually setting this up requires deep knowledge of selection syntax and atom indexing.
SAMSON alleviates this pain point by offering a visual and interactive way to define these groups. If you’ve ever been unsure whether your selection string is correct or how to generate one without scripting, this feature is for you.
Adding your custom index groups in SAMSON
After setting your molecular system, click the Add/edit index groups button:

This launches a pop-up where you can define selections using GROMACS syntax directly, or by using SAMSON’s visual selection tools. You can:
- Select structures in SAMSON visually (e.g., alpha-helical residues).
- Click a button to automatically generate the corresponding GROMACS selection string.
- Test, name, and register this new group into your simulation setup.
Here’s an example: to add a group of alpha helices, select them using SAMSON’s Select > Residues > Amino acids > Secondary Structure > Alpha helices menu. Then click “Generate based on current selection in document.”

Name the group, for example HELICES, test it if needed, and click Add index group to the list:

Use it during any stage
While typically defined during system preparation, these custom groups can be added or edited in later stages too (e.g., during minimization or simulation). The resulting index file, index.ndx, is saved in your project folder for seamless use across GROMACS workflows.
A few notes to keep in mind
- This feature requires that residues and atoms in your system have unique and consecutive indices.
- Index groups are implemented using the
gmx make_ndxcommand familiar to experienced GROMACS users.
Using SAMSON’s integration, even beginners can effectively manage index groups without memorizing selection syntax.
To learn more about system preparation for GROMACS in SAMSON, visit the full tutorial page: https://documentation.samson-connect.net/tutorials/gromacs-wizard/preparation/
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.
