For molecular modelers working with GROMACS, managing index groups can be a pivotal aspect of streamlining advanced workflows. Whether you’re isolating specific residues, defining groups for pulling or analysis, or dealing with non-standard systems, there are times when the default GROMACS index groups just aren’t enough. Rather than manually editing files or wrestling with syntax, SAMSON’s GROMACS Wizard offers a powerful and intuitive solution for creating and managing custom index groups.
What Problem Does This Solve?
When working with molecular systems, predefined default groups like protein, water, or ions may suffice in simpler workflows but can fall short for more advanced needs. Imagine needing to isolate specific neutral or charged residues for a detailed analysis, or setting up pull groups for free-energy calculations like umbrella sampling. Without a guided tool, adjusting or creating these index groups often involves tedious manual work and added risks of errors. Enter the GROMACS Wizard in SAMSON—a practical and user-friendly solution.
Why Add Index Groups at Different Steps?
First, a key decision: should you add your custom index groups during the preparation, equilibration, or simulation steps?
- Preparation Step: If you want to ensure the same groups are readily available for all sub-projects in a batch workflow, this is the ideal point. However, default GROMACS groups will not yet be available at this stage, so careful planning is needed.
- Equilibration or Simulation Steps: These steps allow the use of default GROMACS-generated groups, making it easier to build on existing groups dynamically.
Each approach has its pros and cons, but the GROMACS Wizard makes it easier to decide and implement based on your project’s specific needs.
How to Add Custom Index Groups in SAMSON
When using SAMSON’s GROMACS Wizard, you can take advantage of robust selection tools and syntax to create custom groups. Here’s a walkthrough:
1. Access the Index Groups Editor
Once your system is loaded, simply click on Edit index groups to open the GROMACS Index Groups window. You will see a list of default index groups generated by GROMACS.

2. Create a New Group
It’s possible to use either of the following methods:
- Direct Syntax: Write a GROMACS selection string. For example, to select all non-C-alpha atoms in the protein, use:
"*protein" & ! "C-alpha". - Selection Tools: Use SAMSON’s graphical interface to select residues, atoms, or other structures. For example, to select amino acid residues with neutral side chains, navigate through Select > Residues > Amino acids > Side chain charge > Neutral.

3. Register the Custom Group
After making a selection or writing a selection string, initiate a new group by clicking +, then Generate based on current selection in document. Name the group, add it to the list with Add index group to the list, and save your changes by clicking Apply. SAMSON will handle the rest, saving the group in the index.ndx file.

Pro Tips for Success
- When working with non-standard residue or atom numbering systems, double-check that groups are generated as intended.
- For batch projects, adding index groups during preparation ensures consistency, but if dynamic changes are needed, consider equilibration or simulation stages instead.
- Test your selection strings using SAMSON’s Test selection string feature to verify correctness before registering groups.
Learn More and Get Started
Explore the full documentation for more tips and details on how to use custom index groups in your molecular modeling workflows: Learn More.
SAMSON and all SAMSON Extensions are free for non-commercial use. Download SAMSON today at https://www.samson-connect.net.
