One of the frustrating challenges for molecular modelers is preparing detailed systems for simulations, especially when seeking to analyze specific subsets of molecules. Thankfully, the GROMACS Wizard in SAMSON simplifies this through its option to add custom index groups. Whether you’re working on proteins, ligands, or other molecules, this feature can significantly enhance your workflow.
Why Use Custom Index Groups?
During molecular dynamics simulations, the ability to selectively analyze specific parts of your system—like residues in alpha helices or particular ion groups—can save time and effort. GROMACS automatically generates standard index groups (e.g., for proteins or solvents), but sometimes you need more tailored groups. These custom groups can then be used in later simulations or analyses, such as pull-coordinate groups or energy calculations.
Adding Custom Index Groups
Adding custom index groups in GROMACS Wizard is straightforward:
- Click the Add/edit index groups button in the preparation step.
- A pop-up window will appear where you can define new groups using GROMACS selection syntax or SAMSON’s extensive selection tools.

For example, if you’d like to create a group for alpha helices in your protein:
- In SAMSON, go to Select > Residues > Amino acids > Secondary structure > Alpha helices.
- In the Index Groups window, click the Generate based on current selection in document button. This will automatically create a GROMACS selection string for those residues.
- Give your group a name, such as
HELICES, and click Add index group to the list.

Once added, the group will appear in your list, ready for use in simulations and analyses:

Tips for Using Custom Index Groups
Here are some tips to make the most of this feature:
- Plan your groups early: Define your index groups during the system preparation phase, especially if you anticipate analyzing specific regions or running simulations that depend on tailored group definitions.
- Use SAMSON’s selection tools: SAMSON provides intuitive tools to select atoms or residues manually, and it generates the associated GROMACS selection strings for you. This can save time compared to writing selections manually.
- Reuse your groups: Custom index groups can be utilized in later steps such as energy minimization, equilibration, or even during complex pulling simulations.
- Export: GROMACS Wizard saves the groups in the
index.ndxfile in the project folder, ensuring you can easily edit or reuse them in further analysis.
Next Steps
When preparing molecular systems for GROMACS simulations, tailoring your system with custom index groups can not only make downstream analysis smoother but also help ensure accurate and relevant results. Learn more about this feature and others in the original documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. To get started, download SAMSON from https://www.samson-connect.net.
