Adding custom index groups is one of those things that always sounds more complicated than it needs to be. For many GROMACS users, especially those analyzing complex molecular systems or planning umbrella sampling simulations, grouping atoms efficiently is a routine pain point — particularly when it comes to defining pull coordinates, restraints, or targeted analysis over specific regions of a molecule.
If you’re already working in SAMSON, you might not know that you can define custom index groups in just a few clicks — without writing GROMACS selection strings manually. Here’s how it works, and why it might save you a lot of time in your next simulation setup.
Why custom index groups matter
By default, GROMACS generates standard index groups for proteins, solvents, ions, and other common molecular components. But sometimes you need more specific groups. For example, you might want to track residues forming alpha-helices, or define a group of ligand atoms to compute distances or apply restraint forces.
Traditionally, this means diving into make_ndx and writing your own selection rules by hand — a process that can feel tedious and error-prone, especially in large systems.
How SAMSON simplifies the process
In SAMSON’s GROMACS Wizard, you can define custom index groups using the platform’s built-in selection tools instead of GROMACS syntax. Here’s how it works:
- Select the structure document where your system is loaded or prepared.
- Click the Add/edit index groups button:

- In the pop-up window, use any of SAMSON’s selection tools. For example, to select all alpha helices, go to Select > Residues > Amino acids > Secondary structure > Alpha helices.
- Click Generate based on current selection in document. SAMSON generates the appropriate GROMACS selection string for you:

- Name your group (e.g.,
HELICES) and click Add index group to the list:

The new group appears in the list and will be saved as part of the project in an index.ndx file, ready to be used throughout minimization, equilibration, and production runs.
Can this be done later?
Yes. Even if you skip this during the preparation step, you can always revisit your project and add index groups during any stage of the GROMACS Wizard workflow (e.g., during minimization or simulation setup).
Requirements and tips
- Your system should have unique and consecutive indices for residues and atoms.
- If working with large or multi-model structures, use the Document view to select specific regions before setting up groups.
Whether you’re preparing for a targeted MD run or planning to extract RMSD over a specific region, this feature can speed up your workflow by eliminating manual steps — and it reduces mistakes from custom selection strings.
Learn more about how this works and other preparation steps at the GROMACS Wizard preparation documentation.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at samson-connect.net.
