Efficiently selecting molecular structures is one of the most common challenges faced by molecular modelers. Whether it’s isolating specific ligands, selecting residues of interest, or filtering atoms based on custom attributes, the task can often be tedious and time-consuming—but not with SAMSON’s powerful Node Specification Language (NSL).
Simplify Complex Selections with NSL
The NSL is a robust query language embedded in the SAMSON platform. Designed to make structure and node selection intuitive, it allows you to efficiently search and filter nodes such as atoms, residues, or side chains based on a wide variety of properties. Importantly, NSL expressions can be used in multiple contexts:
- Find command—for search-driven selections (press Ctrl+F / Cmd+F in SAMSON to access it).
- Document view filter box—for interactive filtering within the graphical user interface.
Quick Start Guide: Try NSL Today
If you’re new to NSL, getting started is simple! Here are a few example expressions to copy into the Find command or filter box:
node.type residue: Select all residue nodes.C or H: Select carbon and hydrogen atoms."CA" within 5A of S: Select nodes named “CA” within 5 angstroms of a sulfur atom.node.category ligand, receptor: Select ligands and receptors.
To maximize your productivity, SAMSON even supports context-sensitive completion for NSL keywords. For example, trying "ALA and pressing the Tab key lists all available matches starting with “ALA,” like “ALA 22 Backbone” or “ALA 28.” View a sample interface screenshot below:

Comprehensive Syntax for Customized Queries
The strength of NSL lies in its flexibility. It supports a wide range of operators and features to address different modeling needs:
Logical Operators
Combine queries using and, or, not, and xor. For instance:
node.type residue and not residue.type ALA: Select all residues except alanine.H or O: Select hydrogen or oxygen atoms.
Proximity Queries
Use proximity operators to specify distances between nodes:
"CA" within 5A of S: Select “CA” nodes within 5 angstroms of sulfur.node.type residue beyond 5A of node.selected: Select residues beyond 5 angstroms from the current selection.
Attribute Spaces
NSL features attribute spaces like node, atom, bond, and residue to provide precision in querying. For example, the expression atom.symbol C quickly selects all carbon atoms.
AI-Assisted Selection
Did you know that SAMSON includes an AI Assistant to help with NSL expressions? By clicking the
Ask AI button, the assistant can generate custom NSL queries tailored to your active document hierarchy. This makes complex selections a breeze, even for beginners!
Why Use NSL?
For molecular modelers, NSL not only streamlines selections but also ensures reproducibility in workflows. Whether you are analyzing ligand-binding sites or isolating atoms for further computation, NSL enables precision that saves time and effort.
To dive deeper into the full syntax and explore more examples, visit the original documentation at this link.
SAMSON and all SAMSON Extensions are free for non-commercial use. Get started by downloading SAMSON at SAMSON Connect.
