When “Protein” Isn’t Enough: Building the GROMACS Groups Your Workflow Needs

A molecular simulation can be ready to run and still be missing one small but important piece: the right atom group. Default GROMACS index groups cover common categories such as protein, water, and ions, but workflows like pulling or focused analysis may need a more specific selection. If that group is not defined, the next step can stall—or you may have to revisit an earlier stage to create it.

In SAMSON’s GROMACS Wizard, custom index groups can be built from a selection in the document or from GROMACS selection syntax. The key decision is when to create them. Choosing the right step helps avoid both duplicated work and groups based on information that is not available yet.

Choose the step based on what the group depends on

For a single project, groups can be added during preparation, equilibration, or simulation. If the same group should be available to every subproject in a batch, preparation is generally the practical place to create it once for reuse.

There is a trade-off: during preparation, the default groups that GROMACS will generate later are not yet available to use as building blocks. If your custom group depends on those defaults, wait until equilibration or simulation, after preparation has generated them.

There is also a reason to check preparation-stage groups carefully. Structures with non-unique or non-consecutive residue or atom indices can lead to indexing issues in some cases. Verify that the resulting group contains what you intended. For a single project, creating the group later is another option.

Build a group from a SAMSON selection

When the atoms or residues are easier to identify visually or through SAMSON’s selection tools, start by selecting them in the document. For example, the tutorial demonstrates selecting amino acid residues with neutral side chains through Select > Residues > Amino acids > Side chain charge > Neutral.

Select amino acid residues with neutral side chains

In the GROMACS Index Groups window, click +, then choose Generate based on current selection in document. GROMACS Wizard creates a corresponding GROMACS selection string from the current SAMSON selection. Give the group a useful name, click Add index group to the list, and then click Apply to save it.

Create a custom index group

This route is helpful when the selection is naturally described by the structure or by SAMSON’s selection mechanisms. It also makes the selection step visible: you can first inspect which nodes are selected, then use that selection to define the group.

Combine existing groups with selection syntax

If you already know the GROMACS selection expression you need, you can enter it directly. Existing index-group names can be used in quotes; & means AND, | means OR, and ! means NOT. For instance, the tutorial describes selecting protein atoms while excluding C-alpha atoms. The important idea is to combine a broad existing group with an exclusion rather than manually selecting every atom.

Before adding a group, use Test selection string to check the expression. You can also choose Select in document based on selection string to see which nodes it identifies. This gives you a chance to catch an overly broad or unexpectedly empty selection before saving it.

Add a custom index group using existing index groups

A short verification checklist

  • Confirm the group is being created at a stage where its required default groups are available.
  • Test a typed selection string, or inspect the SAMSON selection before generating one.
  • Check the resulting group, especially when residue or atom indices are unusual.
  • Click Apply; the groups are saved in the project’s index.ndx file.

Custom groups are not just a naming convenience: they make the intended subset explicit for later steps such as pulling and analysis. For the detailed interface steps, see the GROMACS Wizard guide to adding custom index groups.

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

Comments are closed.