Easier Custom Atom Selection in GROMACS Simulations with SAMSON

Many molecular modelers using GROMACS have run into this: you want to track or manipulate a specific set of atoms during a simulation—maybe the side chains of neutral amino acids or every non-C-alpha atom in a protein. But GROMACS only gives you the standard index groups by default. So you end up tweaking selections manually, scripting complex selection strings, or wondering whether there’s a better way. There is.

If you’re already using the SAMSON integrative molecular design platform, the GROMACS Wizard provides a way to add custom index groups visually and intuitively—either at the preparation stage or later during equilibration or simulation. One especially convenient moment is during the equilibration or simulation stage, when the default GROMACS index groups have already been generated and are visible in the interface.

Why add index groups during equilibration or simulation?

At these stages, you’re working with a system that’s already been processed by GROMACS, meaning all standard index groups exist and can be used in new custom selections. This gives you the flexibility to combine, subtract, or filter based on them.

How to Create a Custom Index Group

1️⃣ First, make sure your system is loaded in SAMSON. If it isn’t, just click the Load button next to the input path.

2️⃣ Then, click the Edit index groups button.

Add/edit index groups

You’ll see the list of default index groups GROMACS created. These are available to view but not modify. You can use them in your selection strings or just inspect them by clicking Select in document based on selection string.

Default index groups

Option 1: Manual selection string

To define a group manually, use the GROMACS selection syntax, referencing group names in quotes and using logical operators:

This will select all atoms in the protein except C-alpha atoms. You can test your string and see selected atoms directly in the document.

Using existing index groups

Option 2: Visual selection in SAMSON

Prefer to avoid writing selection strings? No problem. You can use SAMSON’s visual selection tools. For example, to select all amino acids with neutral side chain charges:

Select > Residues > Amino acids > Side chain charge > Neutral

Select amino acid residues with neutral side chains

Once selected, go back to the GROMACS Index Groups window and click + to add a new group. Then click Generate based on current selection in document. The selection string will be created for you.

Create a custom index group

Name your group (for example, “NeutralSideChains”), then click Add index group to the list. Finally, hit Apply to save changes. The index group will be saved in index.ndx within your project folder.

Why this matters

Creating custom index groups visually helps reduce human error, speeds up simulation setup, and allows for targeted analyses or pulling during simulations. It also makes things easier for those less comfortable with selection syntax.

To learn more about custom index groups in GROMACS Wizard for SAMSON, visit the official documentation page.

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

Comments are closed.