When simulating molecular systems using GROMACS, one of the recurrent challenges users face—especially in pulling simulations—is how to define custom index groups. If you’ve ever tried to pull a specific biomolecular segment (like a protein chain) from another while applying restraints or analyzing specific interactions, you’ve likely needed more than what the default groups offer.
This is where the GROMACS Wizard Extension in SAMSON becomes especially helpful. Below we’ll show you how to define custom index groups using the intuitive graphical interface of SAMSON, allowing for more flexibility in molecular dynamics simulations, particularly in pulling setups like center-of-mass (COM) pulling.
When Do You Need Custom Index Groups?
Index groups in GROMACS define atom selections used in various steps of a simulation, including restraints, pulling, energy analysis, and more. The default ones (like Protein, Water, or Ions) are useful but often insufficient for specific experimental setups.
In pulling simulations, especially COM pulling, it’s common to want to apply a force to a specific chain (e.g., chain A) relative to another chain (e.g., chain B). If these aren’t predefined groups, they must be manually created.
Step-by-step: Creating Custom Index Groups in SAMSON
Let’s walk through an example scenario: performing COM pulling of chain A away from chain B in the 2BEG system. Here’s how to create the necessary custom groups.
1. Load the System in SAMSON
First, fetch the structure of 2BEG via Home > Fetch, input 2BEG in the PDB field, and load the molecule. Make sure it appears in the Document view.

2. Access Index Group Editing
Switch to the Simulate tab in GROMACS Wizard where COM pulling is configured. Click on Edit index groups to bring up the list of default and custom groups.

3. Create a Group for Chain A
- Select chain
Ain the Document view. - In the Index Group window, click Generate based on current selection in document.
- Name the group ChainA.
- Click Add index group to the list.

4. Create a Group for Chain B
- Select chain
Bin the Document view. - Repeat the same process and name this group ChainB.

5. Verify the Index Groups
After both groups are added, you can select one and click Select in document based on selection string to verify the atoms included in each group.

Why This Matters
Having full control over which atoms are being manipulated simplifies setup, improves clarity, and avoids mistakes in defining pulling groups. It’s user-friendly, less error-prone, and doesn’t require having to manually edit .ndx files on the command line.
Use It for Pulling Simulations
Once your index groups are defined, you can use them directly in the COM pulling section of the GROMACS Wizard’s Simulation tab:
- Group 1: ChainA
- Group 2: ChainB
This gets particularly useful when scripting umbrella sampling setups or free energy calculations based on pulling simulations.
Want to go further and see the full COM pulling pipeline? Explore the full tutorial page with step-by-step instructions from structure preparation to energy minimization and production MD.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
