Creating custom index groups is a common necessity for molecular modelers working with GROMACS. Whether you are delineating pull groups, isolating specific residues, or setting up advanced analysis workflows, custom index groups provide flexibility that standard GROMACS groups might not cover. With SAMSON’s GROMACS Wizard, defining these groups becomes a much simpler and more intuitive process. Let’s explore how you can efficiently set up custom index groups with this tool and ensure your project runs seamlessly.
Why create custom index groups?
By default, GROMACS generates standard index groups like proteins, water, and ions based on the structure of your molecular system. However, advanced workflows often require finer control. For instance, you may need to:
- Define specific pull groups for simulations.
- Isolate subsets of residues by their properties or location.
- Create tailored groups for comprehensive post-simulation analysis.
While GROMACS provides a make_ndx command for index group creation, SAMSON’s GROMACS Wizard enhances the process with its selection interface and integrates custom group handling into your project workflow.
Adding custom index groups at different steps
One key consideration is when to add the custom groups. Both single and batch project workflows are supported, and you can add your groups during:
- Preparation: Ideal for batch projects since the groups will be reused in all subprojects. However, note that default GROMACS groups will not yet be available at this stage.
- Equilibration or simulation: Optimal if you need to base your new groups on default GROMACS-generated groups.
Step-by-step: Adding groups at the equilibration or simulation step
If your system is already prepared and loaded in SAMSON, adding custom groups becomes straightforward:
- Click Edit index groups in the GROMACS Wizard interface.
- Review the default index groups GROMACS generated. While these cannot be modified, you can use them as references for your custom groups.
- For advanced configurations, you can specify groups using GROMACS selection syntax. For example, to select non-C-alpha atoms in the protein:
"Protein" & ! "C-alpha".
Alternatively, SAMSON allows you to use its built-in selection tools. For instance, to select residues with neutral side chains:
- Navigate to Select > Residues > Amino acids > Side chain charge > Neutral.
Once the selection is made, click + under the index group list to initiate a new group. Then, use the Generate based on current selection in document option to derive the corresponding GROMACS selection string automatically. Name the group, add it to the list, and save the changes by clicking Apply. The new group is now saved in the index.ndx file.

Best practices and considerations
To make the most of the custom index group feature, here are a few tips:
- For batch projects, prefer adding groups during preparation to avoid redundancy.
- Verify the structure’s residue and atom numbering. Unusual numbering might cause indexing errors that require manual adjustments.
- Always test your selection strings using the Test selection string feature in SAMSON to ensure accuracy.
Start improving your simulations today
Custom index groups are an indispensable tool for advanced molecular modeling workflows. SAMSON’s GROMACS Wizard simplifies and integrates this process, saving time and reducing errors. To learn more about adding custom index groups, visit the official documentation page at this link.
SAMSON and all SAMSON Extensions are free for non-commercial use. Get started today by downloading SAMSON at https://www.samson-connect.net.
