Selecting Ligands, Receptors, Water and More in One Line

When working with large molecular systems in SAMSON, it can be hard to focus on just the parts that matter for your task—whether that’s a ligand, a receptor, water molecules, or a visual model. Navigating through hundreds or thousands of nodes manually can quickly become frustrating and error-prone.

This is where the Node Specification Language (NSL) comes into play. NSL is a powerful filtering tool in SAMSON that allows you to target specific parts of your molecular system easily. In this post, we’ll focus on node categories, an efficient and expressive way of selecting entire classes of molecular structures or visual representations.

Why Should You Use Node Categories?

Node categories simplify the selection of functional parts of your molecular system. For example, if you’re interested in hiding all water molecules for clarity, or selecting only the ligand and visualizing it with a specific representation, node categories let you do that cleanly without manually hunting down entities in the data graph.

How Does It Work?

You can use node categories with either their full names or short names inside the NSL syntax. All category filters are applied using:

Or, using short syntax:

You can also combine categories using commas.

Examples

  • n.c lig: matches ligands.
  • n.c gly: matches glycan groups.
  • n.c lig, gly: matches both ligands and glycans.
  • a.s N in n.c lig: matches nitrogen atoms within ligands.
  • n.t a in n.c gly: matches atoms in glycans.
  • n.c hwb in n.c lig: matches hydrogens with bonds in ligands (useful for protonation checks).
  • n.c wat: matches water molecules.
  • a.s O in n.c wat: selects oxygen atoms in water molecules.

Structural vs Visual Categories

Structural categories help you navigate the biological or chemical makeup (e.g. lipids, DNA, receptors), while visual model categories relate to how the model is displayed (e.g. ribbon, cartoon, van der Waals).

For example:

…selects ribbon visual models, while:

…selects all receptor structures.

Combining Category Filters

One of the most powerful features is nesting. You can find, for example, nitrogen atoms only in ligands, or heavy atoms within receptors.

Example: All heavy atoms (non-hydrogen) in ligands:

Tips

  • Use short names for quicker queries: n.c lig instead of node.category ligand.
  • Try n.t a in n.c wat to select solvating atoms quickly.
  • Need to hide the solvent for visualization? Try selecting n.c wat and then hiding the selection.

Visualizing What You Have

To better understand what’s present in your model visually, you can filter by visual model categories too:

This matches licorice and ribbon views, allowing you to toggle styles efficiently.

This approach saves time and helps focus on the most relevant parts of your molecular system—whether it’s for analysis, visualization, or simulation setup.

To explore more filter options and examples, visit the full NSL documentation page: https://documentation.samson-connect.net/users/latest/nsl/node/.

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

Comments are closed.