For molecular modelers, ensuring precise control over specific atom or residue groups is crucial when working with molecular systems in GROMACS. Yet, the default index groups generated by GROMACS often fall short, especially during advanced workflows like pulling or detailed analyses. If you’ve ever faced the frustration of needing tailor-made index groups that align perfectly with your unique workflow, GROMACS Wizard in the SAMSON platform offers an elegant solution.
What Are Custom Index Groups?
Custom index groups are user-defined collections of atoms or residues that serve as the basis for calculations, workflows, and simulations in GROMACS. For example, you might need to isolate specific residues for pulling simulations, track solvent interactions, or identify charged residues for further structural analysis. GROMACS Wizard empowers you to define these groups seamlessly using tools integrated into SAMSON.
Adding Them at the Preparation Step: A Key Efficiency Tip
One of the most efficient ways to manage custom index groups when dealing with batch projects is to add them during the preparation step. This approach ensures the groups are created once and universally applied across all subsequent workflow steps (equilibration, simulation, etc.).
However, a challenge arises since the default index groups generated by GROMACS won’t yet be available at this stage. It’s critical to review the groups post-creation to ensure accuracy, particularly for systems with unusual residue or atom numbering. For single projects, you might prefer adding custom groups after preparation to avoid potential indexing issues entirely.
Warning
When adding index groups at the preparation step, inconsistencies such as non-unique or non-consecutive residue indices can cause errors. Verify your groups after creation or consider adding them during equilibration or simulation steps for greater reliability.
Hands-On: Building Custom Index Groups Using GROMACS Syntax
Let’s walk through creating a custom group as an example:
- Load your system into SAMSON. If it’s not already loaded, click Load next to the input path.
- Access the GROMACS Index Groups window by clicking the Edit index groups button.
- You’ll first see a list of default index groups generated by GROMACS. While these aren’t editable, you can build on them by using selection tools or GROMACS syntax.
For instance, if you want to create a group excluding C-alpha atoms in the protein, you can directly use the selection string: "*protein" & ! "C-alpha". To verify, use the Test selection string feature, which allows you to check the result visually within SAMSON.
Alternatively, leverage SAMSON’s extensive selection mechanisms. For example, to create a group of neutrally charged residues:
- Select neutrally charged residues through Select > Residues > Amino acids > Side chain charge > Neutral.
- In the GROMACS Index Groups window, click + and select Generate based on current selection in document.
- Name the group and click Add index group to the list.
Once added, the new group is saved in the index.ndx file in your project folder and ready to use.

The Next Steps
Once your custom index groups are ready, they can be applied across various workflows, including energy minimization, equilibration, pulling, and free-energy calculations. Check out the original documentation page for more in-depth guidance on how to integrate your custom groups effectively in GROMACS Wizard workflows.
SAMSON and all SAMSON Extensions are free for non-commercial use. Explore the platform by downloading SAMSON from https://www.samson-connect.net.
