When setting up molecular dynamics simulations, small frustrations can have a big impact—especially when it comes to defining groups of atoms for analysis or pulling simulations. By default, GROMACS defines standard index groups such as proteins, water, and ions. But what if you need a more specific atom group? Perhaps all neutral side chains, or a ligand and its surrounding residues? If you’ve ever found yourself writing long selection strings or puzzling over group definitions, this might help.
With SAMSON’s GROMACS Wizard, you can now add custom index groups easily through a visual interface before or during simulations. This reduces errors, avoids jumping between different tools, and simplifies your simulation workflows—especially in complex systems or batch projects.
Why Custom Index Groups Matter
If you’re conducting simulations that involve pulling, umbrella sampling, or selective analysis, GROMACS needs to know exactly which atoms to use. These atoms must belong to defined index groups in a file named index.ndx. By automating this through SAMSON, you avoid manual editing or missing key atoms—sparing you a round of post-simulation troubleshooting.
Creating a New Custom Group During Equilibration or Simulation
To add a custom index group, your system must be loaded in SAMSON. If it’s not visible yet, click Load next to the input path. Then click Edit index groups to open the group management panel:

You’ll see all the existing groups generated during setup. These are not editable, but you can inspect them using Select in document based on selection string:

Ways to Define Custom Index Groups
There are two ways:
- Using GROMACS selection syntax: You can directly type expressions like:
"protein" & ! "C-alpha"
This will select all atoms in the protein except alpha carbons. You can test the selection string and visualize the selection in SAMSON to verify before applying. - Using visual selection in SAMSON: This is helpful for users not familiar with syntax. For example, you can select all amino acid residues with neutral side chains from the menu: Select > Residues > Amino acids > Side chain charge > Neutral.

Then simply click the + button under the index group list and choose Generate based on current selection in document to create a new group automatically.

Finally, name your new group and click Add index group to the list, then Apply to save. The system stores the update in the index.ndx file of the project folder.
When to Use This Feature
Custom index groups offer the most flexibility when added during the equilibration or simulation phase as opposed to the preparation step. At this point, GROMACS has already created the default groups, making it easier to combine or exclude atoms reliably. It also avoids issues with molecules that might have non-consecutive or non-unique atom indexing early in the workflow.
Conclusion
Whether you need to isolate interacting residues for energy analysis or define pulling groups for enhanced sampling, setting up custom index groups shouldn’t be a bottleneck. The GROMACS Wizard in SAMSON makes this accessible even for users who aren’t comfortable with command-line selections by combining graphical selection and automation. Visit the full guide to learn more:
Read the full GROMACS Wizard guide on adding custom index groups.
SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON at https://www.samson-connect.net.
