When running molecular simulations with GROMACS, index groups play a key role in defining subsets of your system for analysis or simulation tasks. While GROMACS creates standard groups automatically—like Protein, Water, and Ions—there are many situations where custom groups are necessary. Whether you’re setting up a pulling simulation, monitoring specific residues, or analyzing energy contributions, a well-defined custom index group can make your life significantly easier.
This brings up a common question: When is the best time to add these custom index groups? One surprisingly flexible option is during the equilibration and simulation steps. Here’s why that can be advantageous, as well as how to do it easily using the GROMACS Wizard in SAMSON.
The Problem: Standard Groups Aren’t Always Enough
Imagine needing to apply a bias only on neutral side chains in your protein—but the default index groups don’t provide that level of granularity. Creating custom groups using GROMACS’s make_ndx CLI tool isn’t always intuitive, especially in large systems. And when running multiple variants in batch simulations, the setup becomes repetitive and time-consuming.
The Solution: Create Custom Index Groups Graphically in SAMSON
The GROMACS Wizard in SAMSON provides a user-friendly window to create and register custom index groups after the preparation step, i.e., during equilibration and simulation. This is especially useful because, by that point, all default index groups have already been generated by GROMACS and are available for reference and combinations.

Step-by-step Example
- Make sure your system is loaded in SAMSON (use the Load button if it isn’t).
- Click on the Edit index groups button. This opens the GROMACS Index Groups window.
- Now you’ll see the list of default index groups. These can’t be modified, but you can base your new group on them using GROMACS selection syntax.
- Click + under the list of groups to create a new group.
- Either enter the selection string manually (e.g.,
"Protein" & ! "C-alpha") or select atoms directly in your model using SAMSON’s selection tools. - Use Generate based on current selection in document to auto-generate the equivalent GROMACS string.
- Give your group a name, press Add index group to the list, and then Apply.

Why Add Groups After Preparation?
Unlike the preparation step—where default groups haven’t yet been generated—the equilibration and simulation steps let you base your new groups on existing ones. This facilitates complex selection logic and helps avoid indexing errors, especially in systems with non-consecutive or non-unique atom and residue indices.
For instance, if you want to monitor the behavior of neutral side chains during a simulation, you can select them directly:
- Go to Select > Residues > Amino acids > Side chain charge > Neutral
- Then use the Generate option in the Index Groups window
This approach minimizes effort and errors, especially in large or complex systems.
Conclusion
Adding custom index groups during equilibration or simulation gives you access to all standard groups and a safe environment to test and validate your selections. Whether you’re running a single simulation or setting up a multi-variant batch system, this flexibility can streamline your workflow.
To learn more, visit the official documentation page.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
