Molecular modelers often encounter scenarios where standard index groups automatically generated by GROMACS just aren’t enough. Whether you need to isolate specific residues, define pull groups, or prepare for advanced analysis, creating custom index groups can significantly streamline your workflow. Luckily, the GROMACS Wizard in SAMSON makes this process more accessible by integrating with the platform’s extensive selection tools.
Why Custom Index Groups Matter
By default, GROMACS creates standard index groups such as those for proteins, water, or ions based on the provided molecular structure. However, tailored workflows often require additional groups, such as amino acids with specific properties or hybrid selections combining multiple criteria. For example:
- Setting up pull coordinate groups for simulations like Umbrella Sampling.
- Preparing residues of interest for focused analysis.
- Filtering atoms based on custom exclusions or combinations.
GROMACS Wizard within SAMSON allows you to add such custom groups efficiently, saving them in an index.ndx file for use in every stage of your project.
Step-by-Step: Adding Custom Index Groups During Equilibration or Simulation
Let us guide you through creating custom index groups at either equilibration or simulation steps, leveraging the advantages of pre-generated default groups:
1. Load Your Project in SAMSON
First, ensure your molecular system is prepared, and load it in SAMSON. Use the Load button next to the input path if it isn’t already loaded.
2. Open the Index Groups Editor
Click the Edit index groups button to open the GROMACS Index Groups window. Here, you’ll find the list of default index groups generated by GROMACS. Though these groups are not editable, their contents can be inspected and integrated into new custom groups.

3. Add a New Custom Index Group
Decide how you want to define your group:
- Using GROMACS Selection Syntax: Write your selection string directly in the interface, using operators like
&(AND),|(OR), and!(NOT). For instance, to select all non-C-alpha atoms in a protein, you would use:*"protein" & ! "C-alpha"*. You can preview the nodes selected by your string using the Test selection string feature. - Using SAMSON’s Selection Tools: Take advantage of SAMSON’s intuitive interface by selecting molecules, residues, or atoms based on predefined criteria such as charge or type. This approach automatically generates the GROMACS selection string for you.
For example, you could select all residues with neutral side chains using Select > Residues > Amino acids > Side chain charge > Neutral in SAMSON’s menu:

4. Save Your Changes
Once you’ve defined your group, click + under the index groups list to add it. Name the group appropriately, and click Add index group to the list. Finally, click Apply to save your changes, ensuring they’re written to the project’s index.ndx file:

Tips for Efficient Custom Groups
Keep a few considerations in mind to ensure smooth creation and usage of custom index groups:
- For batch projects, add groups at the preparation step to minimize redundant work.
- Verify groups carefully if your structure contains unusual residue or atom numbering.
- Use the test feature to validate selection strings, ensuring expected results.
Learn More
Creating custom index groups can dramatically enhance and simplify the molecular modeling workflow. For more details, visit the full documentation at GROMACS Wizard – Adding Custom Index Groups.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Download SAMSON at https://www.samson-connect.net.
