For molecular modelers working with complex systems, keeping track of annotations within a project can be just as crucial as modeling structures and reactions. Whether you’re leaving comments for collaborators or marking specific components for further analysis, notes in SAMSON play a pivotal role in organizing your workflow.
But when managing dozens or even hundreds of notes, a recurring challenge is to find, filter, or batch-modify notes based on their properties. That’s where SAMSON’s Node Specification Language (NSL) and its note attribute space come into play.
Why filter notes at all?
Imagine you’re analyzing a large protein complex. You’ve added notes marking regions of interest: mutation hotspots, regions to revisit, or comments on ligand proximity. Weeks later, you return and want to view only notes starting with “Mut” or those currently marked as hidden. Manually checking each note would be tedious. Instead, you can use nt, the note attribute space in NSL, to quickly target exactly what you need.
Meet the attributes
The note attribute space in NSL is accessed via the nt prefix. It includes several attributes — most of which are inherited from the general node attribute space — but tailored to notes:
| Attribute | Short | Values | Example |
|---|---|---|---|
| name | n |
“text” | nt.n "Mut*" |
| hidden | h |
true/false |
nt.h |
| visible | v |
true/false |
nt.v |
| selectionFlag | sf |
true/false |
nt.sf false |
| visibilityFlag | vf |
true/false |
nt.vf |
| selected | (no short) | true/false |
nt.selected |
Practical use cases
Here are several situations where filtering notes by attributes can speed up your work:
- Show all non-visible notes:
not nt.vhelps you catch annotations you’ve hidden and might have forgotten. - Find selected notes:
nt.selectedlets you act on just the notes you’ve manually selected, which is helpful for batch editing. - Search by prefix:
nt.n "L*"returns all notes with names starting with “L”, such as “Ligand”. - Test scripts safely: Use
nt.sf falseto avoid altering notes unintentionally flagged for selection.
Final thoughts
Efficient molecular modeling is not just about atoms and bonds — it’s about structuring information in a meaningful way. Leveraging note attributes through NSL lets you navigate large systems faster, maintain context in collaborative projects, and ensure your annotations enhance rather than slow down your design process.
To learn more about note attributes in NSL, visit the official documentation page here: https://documentation.samson-connect.net/users/latest/nsl/note/
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
