When working with complex molecular systems, selecting atoms for visualization, editing, or analysis can quickly become overwhelming. Whether you’re developing a new molecule, importing data from experimental studies, or running simulations, you’ll often need to isolate parts of a system—like a specific residue, a certain element, or all atoms in a given structure.
SAMSON’s Node Specification Language (NSL) offers a flexible and powerful solution to this problem. Instead of manually clicking through atoms or navigating convoluted menus, NSL allows you to query and highlight elements across molecular structures using a simple, text-based syntax. This can save tremendous time and reduce errors—especially for large systems or repeated tasks.
What is the Node Specification Language (NSL)?
NSL is a text-based language for selecting nodes in SAMSON. A node is any component in the data graph of your model—an atom, bond, group of residues, or even the entire molecule.
The basic syntax is intuitive. For instance, to select all oxygen atoms, you’d write:
|
1 |
element(O) |
Need all hydrogens in chain A?
|
1 |
element(H) and chain(A) |
Want residues 10 through 20?
|
1 |
residueNumber(>=10 and <=20) |
This approach is both human-readable and incredibly useful once you get the hang of it. You can combine criteria using logical operators like and, or, and not, and use functions to locate atoms based on types, names, positions, or structural context.
Why It Matters
If you’ve ever found yourself lost in a tangle of atom names or struggling to visually identify exactly the group you want to work with, NSL can help.
- Reproducibility: Selections can be saved and reused across sessions or shared with team members.
- Precision: Target specific atoms, residues, or molecules without ambiguity or oversight.
- Automation: Combine NSL-based selections into scripts for batch processing or workflows.
Whether you’re setting up simulations, preparing visualizations for publication, or cleaning structures for docking studies, NSL gives you clarity and confidence in the selections you’re making. No more guesswork.
Getting Started
The easiest way to try NSL is through the selection bar in the SAMSON interface. Simply type an NSL expression and see how your structure updates in real time.
If you’re not sure how to structure your query, the documentation provides a helpful reference of all the functions and keywords available in NSL. You can find it here:
Node Specification Language Documentation
Once you gain a bit of fluency, you’ll likely find that NSL becomes a go-to tool that streamlines your workflows, particularly for large or dynamic molecular models.
NSL is a small part of SAMSON, but for many users, it’s a feature that makes a big difference.
To explore all other core references of the SAMSON platform, visit the full documentation list: https://documentation.samson-connect.net/users/latest/references/
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.
