When running molecular dynamics (MD) simulations with GROMACS, researchers often encounter a scenario where default index groups like Protein, Water, or Ions are simply not enough. This is especially common when specific chains or atoms need to be pulled or restrained independently. In pulling simulations — like center-of-mass (COM) pulling — having precise control over which parts of the system are involved is essential.
In this post, we’ll walk through how to define custom index groups using the GROMACS Wizard Extension in SAMSON. This process is especially useful when preparing a COM pulling simulation that involves two distinct chains, as covered in the 2BEG example from SAMSON’s extensive documentation.
Why custom index groups matter
Imagine you’re trying to pull one protein chain away from another. GROMACS default groups won’t recognize “Chain A” and “Chain B” as separate unless you specifically define them. Failing to do so can lead to ambiguous pulling definitions or simulation misbehavior — frustrating problems that are preventable.
Step-by-step: Adding index groups in SAMSON’s GROMACS Wizard
Before proceeding, ensure your prepared structure is loaded into SAMSON. The system must be imported for the Wizard to reference and identify selections.
Step 1: Open the index group editor
In the “Simulate” tab of the GROMACS Wizard interface, click on Edit index groups. This opens a list of current default groups and an interface for adding new ones.

Step 2: Select your chain
In the Document view, select the relevant chain — say, chain A — by clicking it. This will highlight the atoms you want to include.
Step 3: Generate the selection string
Return to the Index Groups dialog and click Generate based on current selection in document. This will auto-fill a selection string compatible with GROMACS.
Step 4: Name and save the group
Assign a label (e.g., ChainA) and click Add index group to the list. Repeat the same steps for chain B.


Now, you should see both custom groups, ChainA and ChainB, listed among your index groups.

Tip: Verify your groups
Test your custom group by selecting it in the list and clicking Select in document based on selection string. This is a quick way to visually confirm you selected the desired atoms.

Use Cases Beyond Pulling
While creating index groups is key for pulling simulations, it’s also useful in other contexts: restraint applications, analysis groupings, or multi-component system monitoring. Essentially, this simple step opens up broader flexibility in customizing your GROMACS workflows.
For complete instructions and to see how these index groups power the pulling simulation in action, visit the full COM pulling tutorial: https://documentation.samson-connect.net/tutorials/gromacs-wizard/com-pulling/
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
