If you've ever tried analyzing or running custom simulations in GROMACS, you've probably faced this: you need a specific group of atoms that isn’t covered by default index groups like Protein, Water, or Ion. Maybe you want to pull on specific residues, analyze a charged region, or isolate just the hydrophobic core of your system. Here’s the catch: manually editing index files can be a slow trial-and-error process.
Let’s look at a more convenient way.
Adding custom index groups visually with SAMSON
The GROMACS Wizard in SAMSON gives you a much more intuitive interface to create and manage custom index groups. Instead of fiddling with command-line strings or going back and forth with gmx make_ndx, you can visually select regions of your molecular system and let SAMSON generate the correct GROMACS selection string for you. If you’ve ever asked: “Is there a better way to specify atoms than typing selection logic myself?” — this is it.
This approach can be done during the equilibration or simulation steps of workflow in SAMSON’s GROMACS Wizard. These are especially good times to define extra groups since default GROMACS index groups already exist and can be reused or combined into more advanced groups.
Step-by-step example: select residues with neutral side chains
Let’s say you want to create a group that includes only neutral side chains in an amino acid sequence. Here’s how you can do that:
- Load your project in SAMSON and navigate to the Equilibration or Simulation step.
- Click the Edit index groups button.
- Within the GROMACS Index Groups window, use the SAMSON selection interface:
Select > Residues > Amino acids > Side chain charge > Neutral

- Next, in the Index Groups window, click the + to create a new group.
- Click Generate based on current selection in document. SAMSON translates your selection into a valid GROMACS selection string. No guesswork needed.
- Give your group a meaningful name (like
NeutralSideChains) and click Add index group to the list. - Click Apply to save it into your project’s
index.ndxfile.

Can’t remember GROMACS selection syntax?
No problem — that’s where SAMSON helps. You can use existing groups in selection strings using Boolean logic. For example:
|
1 |
"Protein" & ! "C-alpha" |
This selects all protein atoms except C-alpha atoms. You can test it before saving to ensure everything looks as expected.

Benefits of this approach
- Saves time compared to editing the
index.ndxmanually - Reduces errors caused by incorrect indices or syntax
- Makes custom group creation accessible to users who aren’t familiar with GROMACS internals
- Visually verify selections before applying
Whether you’re running umbrella sampling or just curious about a custom interaction region, having a clean, accurate index file is essential. The GROMACS Wizard in SAMSON simplifies this pain point, making it easier to focus on your science rather than the tools.
To learn more about adding custom index groups, including potential caveats when doing it at the preparation step, visit the full documentation page: 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.
