Custom Index Groups in GROMACS Wizard: Why They Matter and How to Create Them

For many molecular modelers, gaining fine control over simulations goes beyond simply setting up a system. Often, it’s just as important to define custom groups of atoms or residues for analysis, restraints, or biasing methods like umbrella sampling. This is where custom index groups come into play.

If you’re using SAMSON’s GROMACS Wizard to prepare systems for simulation, you might not realize how easily you can define and manage custom index groups – and how helpful they can be.

Why use index groups?

By default, GROMACS creates index groups for common components like proteins, water, and ions. But suppose you want to:

  • Apply a pulling force to a loop within a protein
  • Monitor backbone RMSD of specific residues
  • Define a reaction coordinate for a simulation

In these cases, creating custom index groups gives you more precise control. Index groups are referenced throughout GROMACS simulations, from energy analysis to constraints and umbrella potentials. They become essential when running complex setups.

How to add custom index groups in SAMSON

The good news: GROMACS Wizard in SAMSON offers a user-friendly interface to create these groups — and even generates the selection string for you.

  1. Make a selection in SAMSON’s Document view using the built-in selection tools.
  2. Click Add/edit index groups.
  3. Use the button Generate based on current selection in document. This automatically builds the GROMACS selection string.
  4. Name your group (e.g., HELICES).
  5. Click Add index group to the list.

This pop-up interface saves the index group to the index.ndx file using gmx make_ndx. No need to enter GROMACS command-line or manually write selection strings — unless you want to.

Generate an index group selection string based on the current selection in the document

Example: Defining Helices for Pulling Simulations

Let’s say you want to pull on alpha helices of a protein. In SAMSON, use:

Select > Residues > Amino acids > Secondary structure > Alpha helices

This lets you highlight only the residues involved in helices. Then, following the steps above, you define a selection string and add it as a group called HELICES.

Select alpha helices

Things to keep in mind

  • Ensure your structure has unique and consecutive indices for atoms and residues.
  • You can define more index groups later during minimization, equilibration, or simulation steps.
  • It’s always possible to edit the index.ndx file manually, but SAMSON’s tools make this process faster and less error-prone.

Where to find your groups?

After preparation, you’ll see all the index groups (including custom ones) in your document, and you can use them to select atoms directly in the Viewport by double-clicking.

Index groups in SAMSON

Custom index groups help you segment your system in meaningful ways, making your simulations easier to control and analyze.

For additional details, visit the official documentation page.

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

Comments are closed.