Creating custom index groups in GROMACS can be a useful—and at times necessary—part of your molecular simulation workflow. Whether you’re running umbrella sampling, tracking interactions, or preparing for free energy calculations, identifying just the right atoms or residues can save hours of data wrangling later down the line.
But if you’ve ever tried to manually edit an index.ndx file using gmx make_ndx, you probably know how time-consuming and error-prone it can be. Especially when you’re trying to navigate through atom indices or residue names, keeping track of syntax, or trying to make it reproducible across projects.
That’s where the GROMACS Wizard in SAMSON comes in. It lets you incorporate powerful visual selections and generate index groups based on either intuitive GUI selections or directly from GROMACS selection strings.
A Smarter Way to Select
Let’s look at a simple, real-world example: say you’re interested in studying the behavior of the neutral side chains of amino acids in your system. In SAMSON, you can do this in a few clicks:
- Go to Select > Residues > Amino acids > Side chain charge > Neutral.
- The selected residues will be highlighted in your model.

Now, open the GROMACS Index Groups window by clicking Edit index groups. You’ll see a list of default GROMACS index groups, which you can inspect but not modify. To add a new group:
- Click + to start creating one.
- Then hit Generate based on current selection in document.

The wizard automatically translates the visual selection into GROMACS-compatible syntax. You can name the group (like NeutralSideChains) and hit Add index group to the list, then click Apply. The group is instantly added to your index.ndx file, with no manual typing or formatting.
Prefer Scripting? You’re Covered
If you’re comfortable using the GROMACS selection syntax, the wizard also lets you enter custom strings directly. For instance, you could define a group like:
|
1 |
"protein" & ! "C-alpha" |
This example selects all non-C-alpha atoms in your protein. You can verify your selection by clicking Test selection string and check the highlighted atoms in the structural view.

Why It Helps
This approach avoids the guesswork of working directly with large index files or command-line inputs. It also helps consistency across simulation workflows—especially useful if you’re managing batch projects where reproducibility matters.
And if you’re ever working with complex systems where atom or residue indices are not unique or not consecutive, it’s a good idea to verify your selections at each step. The GROMACS Wizard gives you the flexibility to do that interactively, so you can be sure your index groups represent exactly what you intended.
Want to explore this workflow in more detail? Check the complete tutorial about adding custom index groups here.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.
