When preparing molecular systems for simulations with GROMACS, one often underappreciated step is defining custom index groups. These groups play a crucial role in advanced simulations such as umbrella sampling, free energy calculations, or restrained simulations, where specific atom sets need to be monitored or manipulated.
In many workflows, users are limited by the default groups automatically generated by GROMACS (like Protein, Water, Ions). What if you want to isolate only the residues in alpha helices, or atoms near a binding site? This is where SAMSON’s GROMACS Wizard makes it easier.
Why use custom index groups?
Index groups are collections of atoms that GROMACS can reference when applying constraints, output selections, or analysis tools. Custom groups give you:
- Precise control over what part of the system is analyzed or restrained
- The ability to define regions of interest (e.g., reaction coordinates for PMF)
- More insightful post-processing plots and outputs
How SAMSON simplifies the process
Instead of manually generating index groups using GROMACS command-line tools, SAMSON provides a user-friendly interface that integrates selection tools and generates the appropriate selection string automatically.
To create a custom index group:
- In the GROMACS Wizard’s preparation phase, click the Add/edit index groups button.
- A pop-up window opens, allowing you to define your group.
- You can either write a GROMACS selection string or—more conveniently—select atoms/residues visually in SAMSON.
- Then click Generate based on current selection in document.
- Give your group a name, e.g.
HELICES, and click Add index group to the list.
This selection then appears in the list, is saved in the index.ndx file, and can be used in your simulation pipeline.

Example: Selecting alpha helices
A common use case is isolating alpha helices from a protein. You can use SAMSON’s intuitive menu:
Select > Residues > Amino acids > Secondary structure > Alpha helices
This immediately updates your selection; from there, just press the generate button in the Index Groups dialog to translate this into a GROMACS-compatible group.

When should you define custom groups?
Even if you’re not sure you need them yet, it’s a good idea to define index groups during preparation. They can still be added later (e.g., at the equilibration stage) but including them early ensures consistency in your simulation inputs.
Note: Make sure your system has unique and consecutive indices for atoms and residues to avoid issues when creating index groups.
Takeaway
Custom index groups give you more control and flexibility in GROMACS simulations, and SAMSON lowers the barrier to creating them—visually, efficiently, and with fewer chances for syntax errors. Whether you’re doing simple MD or complex multi-coordinate free energy simulations, setting up index groups ahead of time can make your simulation workflow more powerful and reproducible.
To learn more about how to prepare your molecular system in SAMSON for GROMACS simulations, visit the full documentation.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
