For molecular modelers using GROMACS, the ability to refine specific atomic or molecular groups is invaluable during simulations. But did you know you can define custom index groups to better analyze your system or refine your simulations? With SAMSON’s GROMACS Wizard, the process becomes intuitive and efficient.
Adding custom index groups allows you to select and analyze particular subsets of molecules – for instance, a specific region of a protein or specific atoms, like charged side chains. While GROMACS generates standard index groups like proteins, waters, and ions automatically, custom groups give you the flexibility to target precisely what matters most to your simulation goals.
When and Where to Add Custom Groups?
In SAMSON, you can add custom index groups during three key steps: preparation, equilibration, and simulation. Each has its advantages:
- Preparation: Ideal for batch projects since custom groups added here propagate to all subprojects. But note, GROMACS default index groups won’t yet be available.
- Equilibration and Simulation: Useful for single projects since default index groups are already created, which means fewer risks of indexing issues.
How to Add Custom Index Groups in Equilibration or Simulation
If you choose to add custom groups during equilibration or simulation, SAMSON’s GROMACS Wizard makes the process both user-friendly and powerful. Here’s a walkthrough of the steps:
1. Load Your System
Ensure your system is loaded in SAMSON. If it’s not, simply click the Load button next to the input path.
2. Open the Index Groups Editor
Find the Edit index groups button and click it to open the GROMACS Index Groups window. Here, you’ll see a list of default index groups created by GROMACS. While these can’t be modified, you can use them as references for new groups.

3. Create a New Custom Group
You have two options for defining a new custom group:
- Use GROMACS Selection Syntax: For advanced users, GROMACS rules can be manually entered to build specific combinations. Example: To select all non-C-alpha atoms in a protein, you can write:
*protein" & ! "C-alpha*. - Use SAMSON’s Selection Features: For less experienced users or those wanting visual aid, simply select your desired nodes in SAMSON (e.g., all neutrally charged residues via Select > Residues > Amino acids > Side chain charge > Neutral). SAMSON then generates a GROMACS selection string automatically for you.

4. Add Your Custom Group
Once your selection is made, return to the GROMACS Index Groups window and click + to add a new index group. Use Generate based on current selection in document to automatically convert your SAMSON selection into GROMACS syntax. Then, give your group a meaningful name.

When you’re satisfied, click Add index group to the list and finally Apply to save your new group to the index.ndx file in your project folder.
Conclusion
By taking advantage of SAMSON’s GROMACS Wizard, creating and managing custom index groups becomes an accessible and streamlined process. This ensures your simulations and analyses are more targeted and efficient.
For more detailed information and examples, visit the official documentation page: GROMACS Wizard – Adding Custom Index Groups.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Download SAMSON at www.samson-connect.net.
