When working with large biomolecular systems using GROMACS, it’s often necessary to define custom index groups—for example, to specify pull groups for umbrella sampling, analyze specific subsets of atoms, or apply restraints. But creating these groups manually using gmx make_ndx can be error-prone and time-consuming, especially when dealing with multiple systems or batch simulations.
This is where the GROMACS Wizard in SAMSON can make a real difference. Using its built-in selection tools, you can interactively define custom index groups based on structural or chemical features with a few clicks, and have the corresponding GROMACS selection strings generated for you automatically.
Issues Molecular Modelers Face
If you’ve used GROMACS for any length of time, you’ve probably puzzled over naming atoms, grouping residues, and wondering exactly what was selected when you typed an expression like r 1-100 & a CA. Worse, if these selections go wrong, you might not notice until you’ve run hours of simulation time.
For those handling batch simulations, manual index group editing becomes unmanageable. And for those transitioning from more visual tools to the command-line world of GROMACS, the syntax can be intimidating.
Defining Custom Index Groups Using SAMSON
The GROMACS Wizard in SAMSON integrates selection with visualization and lets you track exactly what you’re choosing:
- Load your system into SAMSON and open the GROMACS Index Groups window by clicking Edit index groups.
- You will see the default index groups already generated by GROMACS. These cannot be edited but serve as references or starting points.

To create a new custom group, you can either:
- Use GROMACS selection syntax directly (e.g.,
"protein" & ! "C-alpha") - Or select atoms in the SAMSON document (e.g., all neutral side chains)
Here’s how selection via SAMSON works:
- Select atoms or residues visually using the menu: Go to Select > Residues > Amino acids > Side chain charge > Neutral.
- Click the + button in the GROMACS Index Groups window to add a new group.
- Click Generate based on current selection in document. The selection string is created automatically.
- Name your group, then click Add index group to the list and finally Apply to save it. The group will be saved in the
index.ndxfile.

This workflow ensures that your groups are well-defined and reproducible. If you’re working on a batch of systems, you can do this once during the preparation step and reuse it across all subprojects.
What You Gain
Creating custom index groups visually—and generating valid selection strings automatically—means fewer mistakes and faster setup. You can:
- Visually verify your selections
- Explore existing groups in your document
- Mix Boolean logic and visual operations for flexibility
Ultimately, this approach reduces friction and helps you focus on what matters: your science.
Learn more in the full documentation page »
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.
