The process of analyzing molecular models effectively often hinges on precise node selection—whether that involves atoms, residues, or structural groups. For molecular modelers, manual selection can be time-consuming, error-prone, or outright impractical when working with complex systems. That’s where SAMSON’s Node Specification Language (NSL) comes in, providing a concise, flexible, and powerful way to define precisely what you need.
Let’s explore how the NSL empowers you, avoiding common pitfalls of manual selection and unleashing a whole new level of efficiency in molecular modeling workflows.
Why NSL?
The NSL was created to address a recurring challenge: searching, filtering, and interacting with molecular nodes—such as atoms, residues, or chains—based on their attributes or relationships. Instead of painstakingly selecting nodes one-by-one, you can write a simple expression and let NSL handle the rest. This is especially useful when working on large-scale models or datasets, where traditional approaches become too cumbersome.
Get Started: Core NSL Expressions
Using NSL expressions in SAMSON is straightforward. You can apply them in the Find command for search-based selections or the filter box in the Document view for interactive filtering. Here are some practical examples to take your first steps:
node.type residue: Matches all residues in the document.C or H: Matches all carbon or hydrogen atoms."CA" within 5A of S: Matches alpha-carbon atoms within 5 angstroms of any sulfur atom.node.category ligand, receptor: Matches ligands and receptors.

For example, if you’re interested in selecting all alpha-carbon atoms close to sulfur groups, you can simply write "CA" within 5A of S, and NSL will identify relevant nodes for interaction analysis or visualization instantly.
The Power of Proximity Operators
NSL shines particularly with its powerful proximity operators, allowing you to define spatial relationships between nodes. For instance:
C within 5A of "GLN 2": Captures all carbons within 5 angstroms of the node named “GLN 2.”node.type atom beyond 5A of "2AZ8-IA": Selects atoms that are farther than 5 angstroms from the node named “2AZ8-IA.”
This capability is crucial for tasks like determining binding site interactions, visualizing molecular clusters, or other structure-relationship studies.
Boost Your Workflow with AI Assistance
If you’re unsure how to formulate an NSL expression, SAMSON has your back. With the integrated AI Assistant, crafting precise queries is as intuitive as asking. For example, click the Ask AI button
next to the selection string. The AI Assistant understands the active document’s hierarchy, offering tailored, accurate expressions for your model.
Imagine needing to isolate residues interacting with a specific structural motif. Instead of fumbling through syntax, you can rely on the AI Assistant to propose expressions that match your intent.
NSL Tips for Precision
Here are a few extra tips to master NSL:
- Use logical operators, like
and,or, andnot, to refine your queries. For instance,node.type residue and not residue.type ALAexcludes alanine residues. - Apply name-based matching where needed. Exact matches (
"ALA"), glob patterns ("ALA*"), or regular expressions (re"ALA.*") allow advanced name searches. - Take advantage of range queries, e.g.,
residue.id 20:40, 50:60can quickly target specific residues.
Streamline Your Molecular Modeling
SAMSON’s NSL transforms node selection from a tedious chore into a precise, efficient process, freeing up time and reducing errors. Whether you’re identifying interacting residues, isolating a sub-structure, or filtering visualizations, NSL is your ticket to accelerated results.
For a deeper dive, visit the official documentation and explore more.
SAMSON and all SAMSON Extensions are free for non-commercial use. Get started today by downloading SAMSON from SAMSON Connect.
