For molecular modelers using SAMSON as part of their GROMACS workflows, encountering limitations with default index groups is a common challenge. Whether you’re isolating specific residues, defining pull groups, or preparing detailed analyses, learning how to create custom index groups can significantly enhance the flexibility and efficiency of your simulations. Thankfully, the GROMACS Wizard in SAMSON makes this process straightforward while leveraging its advanced selection tools.
The Problem with Default Index Groups
GROMACS generates standard index groups based on a system’s structure, such as groups for proteins, water, or ions. While these are sufficient for many workflows, advanced tasks often demand more granular definitions. Suppose you need to pull a specific subset of atoms or residues, or analyze unique structural subgroups—these scenarios require custom-defined index groups.
Why Use SAMSON for Custom Index Groups?
SAMSON’s GROMACS Wizard extends your capabilities by seamlessly adding custom index groups to your workflow. It allows you to use SAMSON’s powerful selection tools or directly write GROMACS selection strings. Additionally, creating these groups at the correct step in the workflow ensures alignment with the needs of both single-project and batch-project simulations.
Steps to Add Custom Index Groups
Option 1: During Preparation
Adding custom index groups at the preparation step ensures these groups are created once and reused through the entire workflow:
- In the preparation step of your project within SAMSON, click the Edit index groups button to open the GROMACS Index Groups window.
- Use SAMSON’s selection tools to select nodes for your custom group. For example, to select all neutrally charged residues, navigate to Select > Residues > Amino acids > Side chain charge > Neutral (see image).
- Click + under the list of index groups, then click Generate based on current selection in document. Name your group and click Add index group to the list, followed by Apply to save your changes.

Note that default index groups generated later during the workflow will not be available at this stage, which may limit certain operations.
Option 2: During Equilibration or Simulation
If your system has already been prepared, you can add groups during the equilibration or simulation steps. In this case, GROMACS-generated default index groups will be available to define new groups:
- First, load your system into the document. If it’s not already loaded, click Load beside the input path.
- Open the GROMACS Index Groups window by clicking Edit index groups. Default index groups will be displayed (see image).
- Select a base group using the GROMACS selection syntax or SAMSON’s selection tools. For example, to create a group of all non-C-alpha atoms in a protein, use:
*protein" & ! "C-alpha*. - Test the selection string and verify it by clicking Select in document based on selection string. Once confirmed, register and apply the new group.

Best Practices
With great flexibility comes the need for precision. If your structure has unusual residue or atom numbering, verify the groups carefully after creation to avoid errors. For batch projects, always add custom index groups at the preparation step to maximize efficiency.
Learn More
For a detailed step-by-step tutorial on adding custom index groups, visit the full documentation page at https://documentation.samson-connect.net/tutorials/gromacs-wizard/adding-custom-index-groups/.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.
