Stop Digging Through Atoms Manually: Use NSL to Filter Nodes in SAMSON’s Document View

When working with complex molecular systems in SAMSON, one common pain point is sifting through countless nodes (atoms, residues, structural groups, etc.) in the Document view just to find what you need. Whether you’re inspecting a specific residue type, cleaning a selection, or isolating a functional group, scrolling can feel endless—and frustrating.

But there’s a faster way: the Node Specification Language (NSL) in SAMSON lets you filter nodes directly in the Document view using powerful and precise expressions.

Why Filtering Matters

Imagine you’ve loaded a large biomolecular structure and need to quickly view only the structural groups. How do you get there? You could expand each hierarchy manually… or apply this one-line NSL expression:

This matches all nodes whose type is a structural group. Clean, fast, and immensely scalable. And it works across all node types supported in SAMSON.

How to Use It

In the Document view, just click on the filter icon and enter your NSL expression. Hit Enter to highlight matching nodes instantly. For example:

  • n.t r and not r.t ALA – gets you all non-alanine residues
  • n.t sc h S – filters side chains that contain sulfur atoms
  • a.x -1nm:1nm – highlights atoms with x-coordinates between -1nm and 1nm

Bonus: Ask the AI Assistant

If you’re unsure about the exact NSL expression, use SAMSON’s built-in AI Assistant. Just click the Ask AI button beside the filter input in the Document view. It interprets your intent based on your active document and suggests the appropriate query—especially helpful for newcomers or when working with unfamiliar molecular hierarchies.

Visual Example

Below is a screenshot showing NSL filtering in action, selecting structural groups in a document:

Filter and select nodes from the document view

Filtering vs Searching

Don’t confuse Document view filtering with the Find command. Both use NSL, but the Find command acts globally in the entire active document. In contrast, filtering in the Document view is interactive and lets you visually organize your nodes before selecting them.

Takeaway

If you haven’t used NSL filters in Document view yet, you’re probably spending too much time expanding and scrolling. By learning NSL expressions (or letting the AI help), you can take control of your document hierarchy and focus on your scientific questions—not on clicking through categories.

To learn more, visit the full documentation page for the Node Specification Language (NSL).

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

Comments are closed.