When working on complex molecular models, visual clutter can quickly become a problem. Notes are a convenient way to annotate models — whether to highlight important residues, describe reactions, or mark areas for collaboration. But as projects grow, managing these notes efficiently becomes essential. How can you selectively show, hide, or filter notes depending on their visibility or name? SAMSON’s Node Specification Language (NSL) provides an accessible and effective way to deal with this.
In this post, we’ll walk through how to filter and control your note nodes using the note attribute space (nt) in NSL. This can make a real difference in clarity and productivity, especially during collaborative or presentation stages.
What is a Note Node?
In SAMSON, note nodes are annotations attached to a model. Each note has properties — called attributes — such as name, visibility, and selection state. These attributes let you interact with notes programmatically using NSL queries.
Attribute Syntax Overview
All note attributes belong to the note attribute space, with the short name nt. Here’s a quick glance at some useful note attributes:
nt.n: The note’s name.nt.v: Visible or not.nt.h: Is the note hidden?nt.selected: Whether the note is currently selected.nt.sf: Selection flag (used during selection operations).nt.vf: Visibility flag.
Practical Examples
You can use small queries to select notes based on these attributes. Here are common real-world examples molecular modelers will find helpful:
1. Hide All Notes
To hide all visible notes in your project:
|
1 |
not nt.h |
This selects notes that are not hidden. You can then apply a hide operation.
2. Show Only Specific Notes by Name
Suppose you tagged key annotation notes with names starting with “Important”. To filter them:
|
1 |
nt.n "Important*" |
This selects all notes whose name starts with “Important”. The asterisk (*) acts as a wildcard.
3. Select Only Visible Notes
|
1 |
nt.v |
This is useful when making screenshots or preparing figures. You can unselect or modify only what’s visible.
4. Find Notes Not Currently Selected
|
1 |
not nt.selected |
This helps focus on untouched annotations or automate actions that exclude what’s already been manually selected.
Why It Matters
As molecular models become more complex, managing what you see — and don’t see — is crucial. Note filtering provides immediate visual clarity, which is especially helpful during review meetings, teaching sessions, or collaborative design work. Instead of manually clicking each note to toggle visibility or search by name, simple NSL filters allow you to run targeted queries in seconds.
To explore the full list of note node attributes, 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.
