Creating Custom Index Groups in GROMACS from Your Selections in SAMSON

When preparing biomolecular simulations with GROMACS, molecular modelers often run into a practical challenge: how to define custom index groups that don’t neatly fall into the default categories like protein, solvent, or ions. For example, what if you want to track all neutral side-chain residues, or define a group spanning specific atoms across chains? This is where the GROMACS Wizard in SAMSON becomes especially handy.

In this post, we’ll focus on creating custom index groups during the equilibration and simulation steps using a combination of SAMSON’s powerful selection features and GROMACS selection syntax. This can make your workflow much more flexible and targeted—and it’s particularly useful when working on unique systems or research questions.

Why create custom index groups?

Default index groups in GROMACS are useful but limited. Sometimes, you might want to apply specific restraints, define a pull group in your simulation, or selectively analyze parts of a molecule. Custom index groups allow you to define exactly which atoms or residues you want to target. For instance, you might want to:

  • Isolate only the C-alpha atoms for an RMSD analysis
  • Track all neutral side chains in your protein for conformational studies
  • Focus analysis on ligands or cofactors you’re studying

Using SAMSON’s selection tools

SAMSON offers intuitive visual and property-based selection mechanisms. You can visually pick atoms or use menu-driven queries like:

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

This selection will highlight the relevant atoms or residues right in your 3D structure. You can then instantly translate this selection into a corresponding GROMACS index group.

Select amino acid residues with neutral side chains

Adding the group

Once your selection is made, open the GROMACS Index Groups window by clicking the Edit index groups button. Then click the + button to initiate a new group, and click Generate based on current selection in document. SAMSON will automatically convert your selected atoms or residues into a corresponding GROMACS selection string.

Create a custom index group

You can name the group whatever you like—e.g., NeutralSideChains. Then click Add index group to the list, and finally, hit Apply to save the group to your project’s index.ndx file.

More control with GROMACS syntax

Alternatively, if you’re comfortable with selection strings in GROMACS, you can define new groups using logical operations that combine existing groups. For example:

This selects all atoms in the protein but excludes the C-alpha atoms. You can use the Test selection string feature to preview what atoms the string refers to and even highlight them in your document.

Add a custom index group

Final thoughts

Creating custom index groups directly in SAMSON using the GROMACS Wizard significantly streamlines the preparation of molecular simulations. It combines an intuitive selection interface with powerful customization features—a win for beginners and advanced users alike.

To learn more, please refer to the full documentation here: GROMACS Wizard – Adding Custom Index Groups.

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

Comments are closed.