For molecular modelers working with GROMACS, one pain point that often arises is the need to extend beyond default index groups to define custom subsets of atoms or residues for advanced workflows. Whether it’s for pulling simulations, complex analyses, or other specialized tasks, having the flexibility to create custom index groups efficiently can significantly streamline your modeling process. This is where the GROMACS Wizard in SAMSON provides a seamless solution.
Why Custom Index Groups Matter
GROMACS generates standard index groups (e.g., protein, water, ions) automatically. While sufficient for many applications, these default groups can fall short in scenarios requiring tailored configurations. Examples include defining pull groups, isolating specific residues, or preparing for intricate analyses. By leveraging the tools in SAMSON, you can easily create custom index groups that suit your specific needs directly within the GROMACS Wizard environment.
Getting Started with Custom Index Groups
When defining index groups, your workflow determines the best stage to add them. If you’re managing a batch project, it’s more efficient to define these groups during the preparation step to avoid redundancy across subprojects. Alternatively, if you’re working with a single project, adding them during equilibration or simulation provides access to default GROMACS-generated groups.
The custom groups are created using the gmx make_ndx command and saved in an index.ndx file, which can be reused throughout your workflow. SAMSON’s intuitive selection tools simplify this process further by auto-generating GROMACS selection strings based on your on-screen selections.
How to Add Custom Index Groups
Following are two routes for adding custom index groups:
1. Using GROMACS Selection Syntax
You can create custom groups using GROMACS selection expressions, which support logical operators like & (AND), | (OR), and ! (NOT). For instance, to select all non-C-alpha atoms in the protein, use:
|
1 |
"protein" & ! "C-alpha" |
Test the selection string in SAMSON’s interface using Test selection string. Verify the selection by clicking Select in document based on selection string.

2. Using SAMSON’s Selection Tools
Alternatively, SAMSON’s built-in selection mechanisms help you visually select atom or residue groups. As an example, select neutral side-chain residues via Select > Residues > Amino acids > Side chain charge > Neutral. Once selected, open the GROMACS Index Groups window, initiate a new index group, and click Generate based on current selection in document. The corresponding GROMACS selection string will be auto-populated.
After naming the new group, finalize it by clicking Add index group to the list and then Apply. This ensures the group is saved to your project’s index.ndx file.

Best Practices
For batch projects, prioritize the preparation stage when creating index groups to avoid duplication. For single projects, consider leveraging default groups generated post-preparation for greater accuracy. Verify the groups carefully if your system has unusual residue/atom numbering to prevent indexing issues.
Conclusion
Streamlining your GROMACS modeling project with custom index groups is simple with SAMSON’s GROMACS Wizard. Explore the flexibility of creating tailored subsets of atoms or residues to suit your workflow. To delve deeper into this process, visit the full documentation page.
SAMSON and all SAMSON Extensions are free for non-commercial use. Download SAMSON now at https://www.samson-connect.net.
