One of the challenges many molecular modelers face during simulation setups is effectively organizing and defining subsets of atoms or residues for analysis or advanced simulation tasks. SAMSON’s GROMACS Wizard offers a powerful solution to this with its ability to add custom index groups. In this post, we’ll provide a step-by-step guide to help you take full advantage of this feature, saving you time and streamlining your workflow.
What Are Index Groups and Why Are They Useful?
Index groups in GROMACS are subsets of atoms or residues that you can define to facilitate tasks like pulling simulations, targeted analysis, or specialized configuration. While GROMACS generates standard groups based on systems automatically (e.g., protein, solvent, ions), sometimes you will want finer control with custom groupings tailored to your goals.
With SAMSON’s integrated selection mechanisms, creating custom index groups is streamlined and intuitive, replacing tedious manual processes.
How to Add Custom Index Groups in SAMSON’s GROMACS Wizard
Adding custom index groups in SAMSON is an optional yet powerful step that can be done in a few simple steps. Here’s how:
- Click the Add/Edit Index Groups Button: In the preparation panel, locate and click on the “Add/edit index groups” button to open the index group editor.
- Select Your Atoms or Residues: Use SAMSON’s sophisticated selection mechanisms to define your group. For example, you can select residues based on secondary structure (e.g., alpha helices):

- Generate the GROMACS Selection String: Once your selection is made, click the “Generate based on current selection in document” button in the pop-up window. This will automatically create a GROMACS-compatible selection string for the atoms or residues you highlighted:

- Register Your Custom Group: Name your new group (e.g.,
HELICES). You can test the selection string and verify your choice by selecting nodes in SAMSON. Once satisfied, click the “Add index group to the list” button.
After adding your new group, it will appear in your index group list:

Why This Matters
Custom index groups can help you streamline tasks such as defining pull coordinate groups, analyzing specific regions of your system, or running targeted simulations. They provide better control and organization, simplifying both initial setup and post-simulation analysis. By leveraging SAMSON’s automation and visualization tools, this process becomes efficient and error-free.
Additional Notes
Requirements: Note that your system must have unique and consecutive indices for residues and atoms for the index groups to work as expected. The groups are saved in the index.ndx file, generated during setup using the gmx make_ndx command.
Flexibility: You can add or modify index groups during later stages like minimization, equilibration, or simulation when needed.
To learn more about custom index groups and other preparation options, explore the full documentation at GROMACS Wizard: Preparation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get started by downloading SAMSON at https://www.samson-connect.net.
