A simulation workflow can be ready to run, yet still be missing one small but important piece: an index group that represents exactly the atoms or residues you need. Perhaps you need separate groups for a pulling setup, want to isolate a subset of residues, or need a selection for later analysis. Rebuilding a system or repeating selections at each stage can be frustrating—especially when the same group should be reused across a batch.
GROMACS Wizard lets you add custom index groups using either GROMACS selection syntax or selections made in SAMSON. The groups are created with gmx make_ndx and saved in the project’s index.ndx file. The key workflow decision is when to create them.
Choose the right stage
For a batch project, adding groups during preparation is generally preferable: create them once and reuse them in the later stages and subprojects. There is an important trade-off, though. At preparation time, the default groups that GROMACS will generate during preparation are not yet available to use as the basis for your custom selection.
For a single project, you can add groups during preparation, equilibration, or simulation. If your desired group depends on GROMACS-generated groups, wait until equilibration or simulation, after the system has been prepared. This can make it easier to define a selection from existing groups rather than reconstructing that logic from scratch.

Two ways to define a custom group
Use a GROMACS selection string when you already know the selection logic or want to combine existing groups. The documented operators are & for AND, | for OR, and ! for NOT; group names are placed in quotes. Before adding the group, use Test selection string and, if useful, Select in document based on selection string to check which nodes the expression matches. That quick verification helps catch an overly broad or unexpectedly empty selection.

Build the selection in SAMSON when it is easier to identify the atoms or residues visually or through SAMSON’s selection tools. For example, the tutorial selects amino-acid residues with neutral side-chain charge using Select > Residues > Amino acids > Side chain charge > Neutral. Once the desired nodes are selected, open Edit index groups, click +, and choose Generate based on current selection in document. GROMACS Wizard then generates the corresponding GROMACS selection string. Give the group a meaningful name, click Add index group to the list, and then click Apply to save the changes.

One check worth making
Be especially careful if residue or atom indices in your structure are non-unique or non-consecutive. The documentation warns that index handling can cause issues in some cases when groups are added during preparation. After creation, verify that each group contains the nodes you intended. For a single project, adding the group later—at equilibration or simulation—may be a useful alternative when appropriate.
In short: prepare-time groups are convenient for reuse across a batch, while later-stage groups can use default groups already generated by GROMACS. Whichever route you choose, test the selection and inspect the resulting group before relying on it in a downstream workflow.
Learn more in the GROMACS Wizard documentation on adding custom index groups.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
