Creating and managing index groups in GROMACS can be tedious, especially when working with large biomolecular systems. Whether you’re setting up pulling groups, defining restraints, or preparing simulations, it often requires command-line scripts or careful hand-editing of selections. Fortunately, there’s a more visual and interactive way to do this—in SAMSON’s GROMACS Wizard.
In this post, we’ll guide you through adding custom index groups inside SAMSON using the GROMACS Wizard, with a hands-on example: selecting chains A and B for center-of-mass (COM) pulling. This approach is particularly useful when you’re dealing with protein complexes or multimeric structures where chain-specific pulling or restraints are required.
Why Custom Index Groups Matter ⚙️
By default, GROMACS defines index groups like Protein, Water, and Ion, which are often too coarse for advanced simulations. Need to pull a single chain within a complex? Or restrain specific domains? You’ll need custom index groups. Without visual tools, manually creating these groups can be error-prone and time-consuming.
Visual Workflow for Adding Index Groups in SAMSON
Here’s how you can efficiently create index groups in SAMSON:
- Load the prepared system into SAMSON via the Load button in the GROMACS Wizard’s Input section. This provides access to all structural elements.
- Open the Index Groups Dialog by clicking the Edit index groups button in the Simulation (Production MD) tab.
- Visually select the part of the molecule you want in your custom group. For example, select Chain A in the Document view.
- In the Index Groups dialog, click Generate based on current selection in document.
- Give your group a name (e.g.,
ChainA) and click Add index group to the list.

Repeat the same steps for Chain B. You now have visual, named selections that can be used directly in settings like position restraints or pulling groups.
Testing and Using Selections
Once added, you can:
- Validate selections by choosing any custom group and clicking Select in document based on selection string.
- Use them in COM pulling, where you define which chain is being pulled from which—no need to locate group numbers manually.

Benefits for Molecular Modelers
This visual method offers several advantages over manual workflows:
- No syntax errors—selection strings are auto-generated.
- Easier debugging—visually test which atoms belong to each group.
- Integration—custom groups can be referenced directly during setup steps within the GROMACS Wizard UI.
Want to Try It Yourself?
If you’re preparing a simulation that involves COM pulling—or just want cleaner, more precise group definitions—using SAMSON’s visual interface can save significant time and reduce setup frustration. You can find the full tutorial and more details on preparing for COM pulling here: COM Pulling with GROMACS Wizard.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
