Index groups are essential in molecular dynamics simulations—they allow you to define specific atomic groups for further analysis or to apply forces during a simulation. GROMACS automatically generates standard index groups like Protein, Water, and Ions. But often, modelers need more specialized selections, like specific residues or substructures. This is especially true for advanced techniques such as steered MD or umbrella sampling, where you need to define pull groups manually.
SAMSON’s GROMACS Wizard makes it easier to create these custom index groups using two powerful approaches: the GROMACS selection syntax and SAMSON’s native selection tools. But there is a critical decision to make: when to add your custom index groups. And that timing can affect both compatibility and reliability.
When Should You Add Custom Groups?
You can add index groups during the preparation, equilibration, or simulation steps. If you’re working with a batch project (multiple similar systems), adding them in the preparation phase saves time—as it applies custom groups across all subprojects. However, there’s a caveat.
Warning
At the preparation step, GROMACS has not yet created the default groups. This means you can’t reference them in your custom selections. Also, if your structure has non-sequential residue or atom indices, your custom groups could be off, leading to issues during simulation.
To avoid headaches later, it’s generally safer for individual projects to add custom groups after preparation, when standard groups are already generated. This allows you to combine them in your selection and visually validate them with ease in the GROMACS Wizard.
How to Add Custom Index Groups at Equilibration & Simulation Steps
Once your structure is prepped and loaded, click the Edit index groups button. You can then:
- Browse the automatically generated index groups
- Select parts of the system using SAMSON’s advanced selectors
- Generate a selection string automatically
For example, to select all amino acid side chains with neutral charge, you could go to Select > Residues > Amino acids > Side chain charge > Neutral. Then, just click + and Generate based on current selection in document.

Once you’ve created a new group, name it and click Add index group to the list. Then click Apply to save it in your index.ndx file.
Tips to Avoid Common Pitfalls
- For batch simulations, define groups during preparation, but double-check your residue and atom indices are sequential.
- For single simulations, define groups at the equilibration or simulation step to ensure compatibility with default GROMACS index groups.
- Use the Test selection string button to preview selections before saving.
Understanding when and how to add index groups can save you hours of troubleshooting and help you get more accurate simulation results. SAMSON’s interface simplifies this process, especially when combined with GROMACS selection strings.
To learn more and follow step-by-step instructions, visit the full documentation page here: GROMACS Wizard – Adding Custom Index Groups.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
