Quickly Isolate Atoms by Properties with NSL in SAMSON

When working with large molecular systems, searching for specific atom types—aromatic carbons, water oxygens, charged residues—can feel like finding a needle in a haystack. Whether you’re setting up a simulation, preparing a molecular surface analysis, or generating properties to color in a visualization, selecting the right atoms quickly and accurately is critical.

Good news: if you’re using SAMSON, the Node Specification Language (NSL) provides a concise, powerful way to filter atoms based on dozens of attributes. This post walks you through how to use some of these filters, and provides practical examples you can reuse instantly.

Filter Atoms by Chemical and Structural Properties

Here are some common use cases that molecular modelers often struggle with—and how NSL solves them:

🧪 1. Select Aromatic Carbons

Let’s say you are interested in π-π stacking interactions. You can quickly isolate all aromatic carbon atoms using:

This matches carbon atoms (a.s C) that are aromatic (a.ar).

💧 2. Select Water Molecules

If you’re working on solvation or hydration shell analysis, it’s helpful to find water atoms:

This short expression matches all atoms flagged as water. To filter only the oxygen atoms in water, write:

🔋 3. Select Charged Atoms

If you want to locate atoms with high formal charge—either for visualization or forcefield parameter refinement—you can use:

You can also match atoms with formal charge +2 or +3 like this:

🧠 4. Select Atoms Based on Residue Range

Say you’re analyzing a protein loop between residues 40 and 50:

This matches atoms in those residue sequence numbers, letting you focus on a specific region.

🧲 5. Select Metals Only

Whether you’re modeling a metalloenzyme or coordinating ligands, this one-line command isolates metals:

To exclude metals, use:

Why This Matters

Traditional selection interfaces often require clicking through a graphical interface multiple times or writing long and fragile scripts. NSL simplifies this process into readable, shareable one-liners. These filters can be combined logically, like:

This selects nitrogen atoms in lysine residues with a positive formal charge. No more hunting through chains or residue browsers!

Seamlessly integrated into SAMSON’s selection system, these filters are not only useful for isolating atoms for computation or visualization, but provide reproducible and transparent ways to define atom groups.

Where to Go from Here

There are many more attributes you can filter on, including geometry, partial charges, SYBYL types, bonded atoms, and more. You can even define spatial filters using a.x, a.y, and a.z.

To explore the full list of available atom attributes in SAMSON’s NSL, check out the official documentation page: Atom Attributes in NSL.

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

Comments are closed.