Avoid Repetitive Setup with Custom Index Groups in GROMACS Wizard

For molecular modelers working with complex systems in GROMACS, organization and reproducibility can become a challenge—especially when the same custom selections need to be defined across multiple stages or subprojects. Whether you are preparing simulations or running batch workflows, manually recreating index groups over and over is tedious and error-prone.

Fortunately, GROMACS Wizard in SAMSON provides a flexible way to define and reuse custom index groups using intuitive selection tools or GROMACS syntax. In this post, we’ll focus on one high-leverage use case: adding custom index groups during the equilibration and simulation steps, where pre-existing groups are already available and selection verification is easier.

Why not add index groups early on?

You might think it’s best to define everything at the preparation step. But there’s a catch: standard GROMACS-generated index groups (like Protein, Water, etc.) don’t exist at that step yet. If your new group depends on them, you’re stuck. That’s why adding custom index groups at the
equilibration or simulation stages makes more sense when you want to build on these pre-defined categories.

Step-by-step: Adding groups in equilibration or simulation

Here’s how to do it in a single project:

  1. Load your system in SAMSON by clicking the Load button if it’s not yet active.
  2. Click “Edit index groups” to access the GROMACS Index Groups editor.
  3. You’ll see a list of default index groups (non-editable). To visualize them, click Select in document based on selection string.
  4. Index groups in the document
  5. To add a new group, either:
    • Use GROMACS selection syntax manually (e.g. "Protein" & ! "C-alpha"), or
    • Let SAMSON do the work by selecting atoms/residues in the document and then generating the selection string for you.
  6. For example, to select all residues with neutral side chains:
    • Use Select > Residues > Amino acids > Side chain charge > Neutral from the menu.
  7. Select amino acid residues with neutral side chains
  8. Click + to add a new group, then Generate based on current selection in document.
  9. Give the group a name and click Add index group to the list, then Apply to save it to index.ndx.

This workflow makes it easy to define consistent selections without remembering GROMACS syntax, and eliminates the need to manually rebuild selections across steps.

Why this makes your life easier

  • No more redoing selections manually across complex workflows.
  • Visual feedback ensures that groups are defined correctly.
  • String-based or visual selection: use what works for you.
  • Reproducibility: your selections are stored and can be re-applied easily.

If you’ve ever spent too much time trying to remember what atoms went into your index group, or had to fiddle with make_ndx for every rerun—this small but powerful feature will save you effort down the line.

To learn more about adding custom index groups to your simulations using GROMACS Wizard, visit the official documentation: GROMACS Wizard – Adding Custom Index Groups.

SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.

Comments are closed.