Simulation experts using GROMACS often start by relying on automatically generated index groups—like protein, water, or ions. These built-in groups are handy for many standard tasks, but when simulations get more specific (like defining pull groups or focusing on certain atom types), those defaults might not cut it anymore.
This is where SAMSON’s GROMACS Wizard comes in. It offers a straightforward and visual way to define custom index groups using either GROMACS selection syntax or SAMSON’s intuitive selection tools. In this post, we’ll walk through why and how to create these index groups after the preparation step—specifically during equilibration or simulation—where you can access all the default index groups already generated by GROMACS.
Why Create Custom Index Groups Later in the Pipeline?
Custom index groups can be defined at preparation, equilibration, or simulation steps. However, defining them during equilibration or simulation has a major benefit: you can base your custom groups on the pre-existing default ones. This enables more precise group definitions and helps prevent indexing issues, especially if your system contains non-unique residue or atom indices.
Step-by-Step: Adding Index Groups During Equilibration or Simulation
- Make sure your system is loaded in SAMSON. If it isn’t, click the Load button next to the input path.
- Click the Edit index groups button to open the GROMACS Index Groups window.

You will now see all the default groups listed. While you can’t modify these directly, you can use them in your own selection strings.

Use Case 1: Creating Groups Based on Existing Indexes
Suppose you want a group that includes everything in the protein except C-alpha atoms. You can do this by writing the selection string:
|
1 |
"protein" & ! "C-alpha" |
Click Test selection string to make sure it behaves as expected, and Select in document based on selection string to visually review selected atoms.

Use Case 2: Graphically Selecting Atoms for Your Index
Not comfortable with selection syntax? No problem. You can also select atoms directly in SAMSON. For example, you could:
- Go to
Select > Residues > Amino acids > Side chain charge > Neutral - This selects all amino acid residues with neutral side chains.

Then, go back to the GROMACS Index Groups window, click the + icon to create a new group, and choose Generate based on current selection in document. SAMSON will automatically build the appropriate selection string. Name your group and click Add index group to the list. Don’t forget to click Apply to save the new group to your index.ndx file.

Final Thoughts
Adding custom index groups during equilibration or simulation steps can help tailor your simulation setup more precisely, making your analysis more efficient later on. Whether you’re isolating functional sites, customizing pull groups, or analyzing specific residues, SAMSON’s GROMACS Wizard simplifies this often tedious task.
To learn more, see the original documentation: 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.
