Anyone who has worked with GROMACS knows that defining the right index groups can be a challenge—especially when your system involves complex molecular structures or you’re setting up simulations like center-of-mass (COM) pulling. If you’ve ever found yourself tediously creating index files by hand, this post might make your workflow a little smoother.
In SAMSON’s GROMACS Wizard, defining custom index groups becomes a visual, user-friendly task. Whether you’re pulling a protein chain or restraining specific atoms, this method can save time—and reduce errors.
What are index groups, and why define your own?
GROMACS uses index groups to define sets of particles, like entire molecules, chains, or user-defined selections, for operations such as position restraints, pulling, and analysis. By default, groups like Protein, Water, and Ion are automatically recognized.
But often, you’ll want to work with specific parts of your system—maybe you need to pull just chain A away from chain B, or apply restraints only on a particular domain of a protein. That’s when user-defined index groups become essential.
How to define index groups in SAMSON
Let’s look at a common scenario: pulling chain A of a protein from chain B. Here’s how you can define chain-specific index groups:
- First, load your prepared structure into SAMSON.
- Open the GROMACS Wizard and navigate to the Simulate tab.
- Click on Edit index groups to open the editor window.

This opens a window showing default and custom index groups. To create a custom group for chain A:
- Select chain A directly in the document view (the scene graph-style panel).
- In the index group editor window, click Generate based on current selection in document.
- Name your group—for example,
ChainA. - Click Add index group to the list.

Repeat the process for chain B:

And just like that, your custom groups are defined and ready to use in pulling, restraints, or analysis. You can even validate your selections using the Select in document feature to double-check your group definitions.

Why this method matters
Unlike command-line methods where you must manually edit or generate index files using make_ndx, SAMSON provides an intuitive visual interface. That means fewer errors, better reproducibility, and a much more responsive workflow. If you’re setting up complex simulations—umbrella sampling, pulling, or free energy calculations—having confidence in your index groups is essential.
Visual creation also helps teaching and collaborative work: you can demonstrate and share selections easily without diving into atom indices.
Learn more about how this fits into a full COM pulling simulation using the tutorial here.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.
