Anyone working with molecular simulations using GROMACS has probably encountered the need to define specific groups of atoms—called index groups. Whether for pulling coordinates, selective restraints, or custom analyses, these groups are essential. Yet, editing index.ndx files manually can be error-prone and time-consuming, especially when dealing with large or complex systems.
If you’re using SAMSON’s GROMACS Wizard, there’s a faster way. SAMSON lets you define custom index groups using its intuitive selection tools—no manual scripting required.
Why Create Custom Index Groups?
By default, GROMACS creates standard groups like Protein, Water, and Ions. But many advanced workflows—such as umbrella sampling or distance restraints—require custom groups. These might be:
- Residues in alpha helices
- Binding site atoms
- Ligand atoms
- Specific chains or domains
Step-by-Step: Intuitive Selection in SAMSON
Here’s how to define a new atom group in SAMSON and have it automatically translated into a GROMACS index group ready for simulation:
- Select the atoms in SAMSON using its graphical selection tools. For example, go to
Select > Residues > Amino acids > Secondary structure > Alpha helices. - Click Add/edit index groups in the GROMACS Wizard.
- In the dialog, click Generate based on current selection in document.
- Name your group (e.g.,
HELICES), and optionally test it. - Click Add index group to the list.
This will generate the GROMACS selection string for you and save it to index.ndx, using the gmx make_ndx command. No scripting needed, and no risk of breaking your simulation setup with typos.

Advantages of Using SAMSON
- 🌟 Visual selection: Select by secondary structure, chains, atom types—without memorizing selection syntax.
- 🧠 Less error-prone: Eliminate the guesswork of editing index files manually.
- 📂 Automatic integration: Custom groups are saved directly in your GROMACS project.
These custom groups remain with your project, so you can use them not only during preparation, but also in later steps like minimization, equilibration, and production MD.

Tips
- Make sure that residues and atoms have unique and consecutive indices.
- Use the Select menu to build complex selections visually.
- Test your selection string before adding the group.
Learn more about index groups in the documentation.
To learn more about system preparation and modeling in the GROMACS Wizard, visit the official documentation page.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
