When working with molecular dynamics simulations in GROMACS, one common challenge is defining atomic groups for analysis, restraints, or pull codes. By default, GROMACS generates some standard index groups (like Protein, Water, or Ion) automatically. But what if you need something more specific—say, all neutral side-chain residues or a subset of backbone atoms excluding C-alpha carbons?
This is where the GROMACS Wizard in SAMSON becomes especially useful. With its intuitive interface and connection to SAMSON’s selection mechanisms, it removes a lot of the complexity involved in generating custom index groups. Here’s how it simplifies your workflow.
Why Custom Index Groups Matter
Having precise control over which atoms or residues belong to a group allows for more meaningful simulations and targeted analysis. Whether you’re performing umbrella sampling or pulling specific atoms along a reaction coordinate, you often need non-default groups that better reflect your scientific needs.
Editing Index Groups During Equilibration or Simulation
If you’re at the equilibration or simulation stage, your system is already prepared, and the default index groups have been created. This simplifies the process of building new groups because you can reference the existing ones.
In SAMSON’s GROMACS Wizard, clicking the Edit index groups button opens a window listing default index groups:

From here, you can:
- Use Boolean logic to combine or subtract from existing groups using GROMACS selection syntax
- Borrow the names of default index groups in quotes, and combine them using operators:
&(AND),|(OR), and!(NOT) - Test your selection strings and preview which atoms are selected directly in the molecular scene
Here’s an example syntax to select all protein atoms that aren’t C-alpha:
|
1 |
"Protein" & ! "C-alpha" |
This can be visualized and tested using the Select in document based on selection string button to ensure your logic works as expected.
Alternatively, Use Visual Selection in SAMSON
If building logic syntax strings isn’t your thing, SAMSON offers an even easier method. You can select atoms or residues directly using SAMSON’s rich selection UI.
For example, to select residues with neutral side chains:

Once selected, go to the Index Groups window, click + to create a new group, and click Generate based on current selection in document. The Wizard will auto-generate the GROMACS selection string for you:

After naming your group and clicking Add index group to the list, apply the changes to save them. They’ll be stored in the index.ndx file inside your project folder.
Helpful Tip
Be aware that if you add custom groups during preparation, some default index groups may not be available yet. Also, indexing issues might arise if your system has non-unique or non-sequential residues or atom indices. For such cases, it’s safer to add custom groups during equilibration or simulation, where most indices are already resolved.
Wrapping Up
The combination of SAMSON’s interface with GROMACS Wizard takes much of the friction out of a traditionally tedious task. Whether you’re a beginner or experienced user, the ability to visually create, preview, and test index groups can help you stay focused on science instead of syntax.
To learn more about adding custom index groups in GROMACS Wizard, check the official documentation here.
SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON at https://www.samson-connect.net.
