Quickly Hide or Filter Notes in SAMSON with Attribute Flags

When working with complex molecular systems in SAMSON, it’s common to annotate structures using notes. These notes help document assumptions, highlight areas for further study, or simply organize thoughts directly within the visual model. However, as a project grows, the number of notes can quickly become unwieldy, cluttering the visual space and making navigation difficult.

Fortunately, the Node Specification Language (NSL) makes it easier to manage these notes through simple but powerful attribute filters. In this post, we’ll look at how you can use the note attribute space to filter, hide, and organize notes more effectively.

Understanding the note Attribute Space

In SAMSON’s NSL, every type of node (whether it’s an atom, bond, group, or note) belongs to a specific attribute space. For notes, this space is note (short name: nt). You can filter note nodes based on their various attributes like visibility, selection state, and custom naming.

Here’s a breakdown of the most relevant attributes you can use with nt:

  • nt.h – Is the note hidden?
  • nt.v – Is the note visible?
  • nt.selected – Is the note currently selected?
  • nt.sf – Selection flag
  • nt.vf – Visibility flag
  • nt.n – The name of the note

Common Use Cases

Let’s look at a few helpful ways these attributes can be used in practice.

🗂 Filter Notes by Name Pattern

Let’s say you use note names to tag different tasks like “To Do – Ligand” or “Refine – Site A”. If you want to find all notes that start with “To Do”, you can use:

This will select all notes whose name attribute begins with “To Do”.

👻 Hide or Show Notes

If your scene is becoming cluttered, you might want to hide certain notes:

This expression selects all note nodes that are currently hidden. To show them again or check which are visible, you can use:

🎯 Filter by Selection State

Need to get back to a group of notes you recently selected? Use:

Or to exclude selected notes:

🎛 Combine Filters

You can combine attribute filters to refine your search. For example, to find all visible notes that include the word “active”:

Why It Matters

Using these attributes helps keep your workspace clean and focused. This becomes especially important in collaborative projects or larger molecular assemblies, where notes are heavily used to guide decision-making or encode metadata.

Moreover, using NSL queries through the selection inspector or scripting can make your workflows significantly faster by allowing batch manipulation of note nodes based on custom criteria.

Looking for More?

The attributes mentioned here are inherited from the general node attribute space, but tailored specifically to note nodes. To explore more about each attribute and how they relate to notes, check the complete documentation 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.

Comments are closed.