A molecular simulation can be perfectly prepared and still stall when a later step needs a group that does not exist. Maybe you need to pull on a particular region, analyze only selected residues, or separate atoms for a downstream workflow. The challenge is not simply making a selection—it is deciding when to create it and checking that it represents the atoms you intended.
In GROMACS Wizard, custom index groups are saved in the project’s index.ndx file. You can add them during preparation, equilibration, or simulation. Choosing the right point can save repeated work, but each option has a trade-off.
Choose the timing based on what the group depends on
For a batch project, preparation is usually the practical choice. Create the group once at the preparation stage so it can be reused by the project’s later subprojects. This works best when the group can be defined directly from the structure and does not depend on GROMACS-generated default groups.
For a single project, equilibration or simulation may be more suitable if your selection needs to use default groups generated during preparation. At those later stages, you can build on the groups GROMACS has already created. The decision is therefore less about which stage is universally best and more about whether your intended selection needs information that is available only later.
There is also a reason to be cautious when creating groups during preparation: structures with non-unique or non-consecutive residue or atom indices can lead to indexing issues in some cases. If that applies to your system, verify the resulting group carefully—or consider adding it at a later stage for a single project.
Two ways to define a group
You can enter a GROMACS selection string directly, or select atoms or residues in SAMSON and let GROMACS Wizard generate the corresponding selection string. The second approach is useful when you can identify the desired structure visually or through SAMSON’s selection tools, rather than writing the selection expression from scratch.
For example, you might select amino-acid residues with neutral side chains using SAMSON’s selection menu, then generate a group from the current document selection. In the GROMACS Index Groups window, click +, choose Generate based on current selection in document, name the group, and click Add index group to the list. Finish by clicking Apply to save the changes.

If you prefer to write the selection yourself, existing index groups can be combined using & for AND, | for OR, and ! for NOT. Group names are put in quotation marks. For instance, a selection combining the protein group with the exclusion of a C-alpha group can be expressed as "protein" & ! "C-alpha". Check the spelling and names against the groups available in your project.
Validate before using the group
A group name can look right while its membership is wrong. Before using a custom group in pulling or analysis, test the selection string and inspect which nodes it selects in the document. GROMACS Wizard provides Test selection string and Select in document based on selection string for this purpose. You can also inspect the default groups: they are not editable, but selecting their corresponding nodes helps clarify what they contain.

This small verification step is especially useful for unusual numbering and for groups that will be reused across many batch subprojects. Confirming membership early helps prevent a later workflow from quietly using a selection different from the one you intended.
For the full instructions and screenshots, see the GROMACS Wizard guide to adding custom index groups.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON at samson-connect.net.
