Managing Custom Index Groups During GROMACS Simulations with SAMSON

Creating custom index groups is a recurring need in molecular simulations with GROMACS. Whether you are working on protein-ligand complexes, membrane systems, or free energy calculations, being able to define and reuse specific atom or residue groups simplifies analysis, facilitates applying constraints or pulling forces, and keeps workflows consistent.

But adding custom index groups can be tedious — especially if you’re managing multiple projects. This is where SAMSON’s GROMACS Wizard offers a smooth experience, especially when you do this during the equilibration or simulation steps.

Why Create Custom Index Groups Later in the Workflow?

During the preparation step, GROMACS has not yet generated its standard index groups, which means you can’t reference those standard groups when defining new ones. Instead, when you reach the equilibration or simulation steps, the default groups (like Protein, Water, Ion, etc.) are already available. This lets you build more meaningful and flexible selection strings such as:

This string selects all protein atoms except C-alpha atoms — something you might need in umbrella sampling scenarios or subsystem analysis.

Here’s How It Works in Practice

Once your system is loaded in SAMSON, click the Edit index groups button:

Add/edit index groups

This opens the GROMACS Index Groups panel, showing the default index groups created by GROMACS:

Default index groups

You may also find those same groups organized in your document inspector:

Index groups in the document

Two Ways to Add a Custom Index Group:

  1. Via GROMACS selection syntax: Use strings combining existing groups with logical operators (AND: &, OR: |, NOT: !). Example: "Protein" & ! "C-alpha". You can test and visualize your selection before adding it.
  2. Via SAMSON’s selection tools: Select part of your system (e.g., neutral side chains), and let the GROMACS Wizard generate the selection string for you.

Select amino acid residues with neutral side chains

Then, name your group and click Add index group to the list followed by Apply. Your new group is now saved in index.ndx — ready for use in pulling or restraints, or just for clearer analysis.

Create a custom index group

By adding custom groups during the equilibration or simulation step, you retain access to default selections and reduce risk of indexing issues that can arise from non-unique or disordered atom/residue numbers early in the workflow.

Whether you’re managing a single system or a larger batch of projects, this method offers better clarity, consistency, and control. It’s particularly useful when you’re experimenting with analysis protocols or need to support reproducibility across team members and datasets.

To learn more and see detailed step-by-step examples, visit the official documentation page: GROMACS Wizard: Adding custom index groups.

Note: SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.

Comments are closed.