Adding Custom Index Groups in GROMACS Wizard: A Simple Way to Organize Your Selections

When setting up a molecular simulation, small things can save hours down the line. One of those things is organizing your system with custom index groups.

GROMACS automatically generates standard index groups like Protein, SOL, and IONS based on the topology of your system. But sometimes, you need more granularity—for example, selecting alpha helices, separating chains, or grouping specific residues involved in interactions.

This is where SAMSON’s GROMACS Wizard makes a difference: it allows you to define custom index groups with just a few clicks. These groups are stored in the index.ndx file and can be re-used later during energy minimization, equilibration, pulling simulations, umbrella sampling, or post-processing.

Why use custom index groups?

Let’s say you want to analyze how an alpha helix of your protein behaves during a simulation. Without a pre-defined index group, you’d have to select it manually in each step. With a custom group like HELICES, you can reference it directly in GROMACS commands—in analysis tools like gmx distance, gmx rms, or gmx trjconv.

How to define a custom index group in GROMACS Wizard

  1. Click the Add/edit index groups button.
  2. In the pop-up window, use SAMSON’s visual selection tools. For example:

    Select > Residues > Amino acids > Secondary structure > Alpha helices
  3. Once the selection is made, click Generate based on current selection in document. This will generate a selection string compatible with GROMACS.
  4. Name your index group (e.g., HELICES).
  5. Click Add index group to the list.

Here’s how it looks:

Index groups UI

In this example, the generated selection string might look like r 5-14 18-24 (meaning residues 5 to 14 and 18 to 24). You don’t need to know this syntax—it’s created for you.

Important notes

  • This step requires that atoms and residues in your system have unique and consecutive indices.
  • New index groups are saved using gmx make_ndx. The corresponding index.ndx file is stored in the project folder.
  • You can add index groups later during minimization, equilibration, or simulation steps as well.

Once created, these index groups appear in the folder structure of your prepared system inside SAMSON.

Index groups in SAMSON

This organization can save time and avoid errors, especially in batch simulations or when you revisit your project weeks later.

To learn more and explore the full preparation workflow, visit the official SAMSON documentation at https://documentation.samson-connect.net/tutorials/gromacs-wizard/preparation/.

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

Comments are closed.