Quickly Select Aromatic Carbons (and More) with Atom Attributes in NSL

Molecular modeling often involves selecting very specific subsets of atoms. For instance, you might want to isolate only aromatic carbons, or exclude metal atoms from a visualization. These selections can quickly become tedious—unless you know how to use the Node Specification Language (NSL) in SAMSON.

NSL provides a concise way to filter atoms using attributes. One powerful attribute combination is:

This line selects carbon atoms (a.s C) that are also aromatic (a.ar). Simple, quick, and very useful for analyses like π-π stacking, electron delocalization, or visual inspections across multiple molecules.

Why this is useful

Let’s say you’re building a training dataset of aromatic substructures or analyzing hydrogen bonding environments. Being able to isolate atoms using attributes like aromatic, hydrogenBondDonor, or hybridization saves time and avoids manual picking.

More attribute combinations to explore

  • Select all oxygen atoms that are hydrogen bond acceptors:
    a.s O and a.hba
  • Find carbon atoms that are planar and aromatic:
    a.s C and a.ar and a.pl
  • Hydrogens attached to nitrogen or oxygen (i.e. possible donors):
    a.hp
  • Non-polar hydrogens:
    a.hnp
  • Fixed atoms only (e.g. frozen during simulation):
    a.f

These atomic attributes help streamline workflows for:

  • Preparing molecular systems
  • Analyzing hydrogen bond networks
  • Selecting coarse-grained model components
  • Restraining atoms in simulations

Combining attributes

NSL lets you use logical operators like and, or, and not to craft more advanced selections:

This line selects all nitrogen atoms that aren’t hydrogen bond donors.

Don’t forget short names

If you prefer typing quickly, remember the short names listed in the documentation. For example:

  • a.ar = atom.aromatic
  • a.s = atom.symbol
  • a.hba = atom.hydrogenBondAcceptor

Try it yourself

In SAMSON, open the Selection window or use the Node Specification area to paste any of these filters and see instantaneous results. Try layering conditions to explore your system based on chemical or structural features.

To explore the full list of attributes and examples, visit the official documentation.

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

Comments are closed.