Build the GROMACS groups your workflow actually needs

A molecular workflow can be ready to run and still be missing one important piece: an index group for the atoms or residues you want to pull, analyze, or otherwise target. Rebuilding a system just to define a group is frustrating—and choosing the wrong point in the workflow can limit which selections are available.

In SAMSON’s GROMACS Wizard, custom index groups are created with the selection tools available in SAMSON or with GROMACS selection syntax. The useful first question is not how to write the selection. It is when to create the group.

Choose the right step

  • Preparation: Create groups here when they should be available throughout the workflow or reused across a batch project. For a batch, this is generally the practical choice because the group is created once for the subprojects.
  • Equilibration or simulation: Create groups here when the system has already been prepared and your selection depends on the default groups GROMACS generated. Those defaults are not yet available during preparation.

There is a trade-off to keep in mind: preparation-stage groups may be affected by unusual, non-unique, or non-consecutive residue and atom indices. Verify the resulting groups after creation. If you are working with a single project and need the generated default groups, creating the custom group at a later step can be a better fit.

Use the current document selection

Once the prepared system is loaded, open Edit index groups. The window lists the default groups generated by GROMACS. They cannot be modified, but you can inspect what they select: choose a group and use Select in document based on selection string. The groups are also available in the document folder, where double-clicking one selects its corresponding atomic structures.

To make a custom group from a visual selection, first select the relevant nodes in the SAMSON document. For example, the selection tools can identify amino-acid residues with neutral side chains. In the GROMACS Index Groups window, click +, then Generate based on current selection in document. The Wizard generates a GROMACS selection string from that selection. Give the group a meaningful name, click Add index group to the list, and then click Apply.

This route is especially useful when you know what you want to select visually but do not want to construct the selection expression by hand. It also gives you a practical way to define a subset of residues or atoms for a later step without relying on a long, manually maintained list.

Creating an index group from a selection of neutral side-chain residues

Or combine existing groups with selection syntax

If you prefer to specify the selection directly, the interface accepts GROMACS selection syntax. Existing index-group names can be placed in quotes, and &, |, and ! represent AND, OR, and NOT operations. This lets you define a group by combining or excluding existing groups—for instance, a subset of a protein group that excludes a particular atom group.

Before adding the group, use Test selection string to check the expression. You can also use Select in document based on selection string to see which nodes it matches. This simple verification step helps catch an expression that selects too much, too little, or the wrong part of the system before you rely on it downstream.

Adding a custom group using existing GROMACS index groups

A quick check before moving on

  • For a batch project, decide whether creating the group during preparation will make it reusable across subprojects.
  • If your selection relies on GROMACS-generated defaults, wait until equilibration or simulation.
  • Test a typed selection, or inspect the nodes selected from the SAMSON document.
  • After applying, confirm that the group appears in the list and that the expected result is saved in the project’s index.ndx file.

Custom groups can support pulling, analysis, and other workflows that need a precisely defined subset of the system. For the full procedure and related GROMACS Wizard steps, see the original documentation page.

Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.

Comments are closed.