Stop guessing: how to filter notes by visibility, name, and more in SAMSON

When managing complex molecular models in SAMSON, clarity is key. If you’ve ever struggled with too many annotations cluttering your workspace—especially when trying to track down specific notes—this post is for you.

In SAMSON, “note” nodes are useful for organizing molecular designs, leaving comments, or tagging parts of structures. However, as your project grows, the number of notes can skyrocket—making it hard to find or focus on the relevant ones.

Fortunately, you can filter and manipulate notes using the Node Specification Language (NSL) and its attributes. In this post, we’ll show you which attributes are available for note nodes and provide hands-on examples for filtering notes more efficiently.

About the note attribute space

To target only notes in SAMSON, you can use the note attribute space, which has a short name: nt. With this, it’s easy to query only note nodes instead of all node types (such as molecules, atoms, etc.).

The attributes available under nt include:

  • hidden (h)
  • name (n)
  • selected
  • selectionFlag (sf)
  • visibilityFlag (vf)
  • visible (v)

Common use cases

1. Find notes by name

Looking for notes titled “Ligand A” or a group of notes that start with “Temp”? Use string matching:

This will match notes whose names are exactly “Ligand A”, or ones whose names start with “Temp”, respectively.

2. Filter visible notes

To find all visible notes:

To find notes that are not currently visible:

This is helpful when you want to clean up your workspace but don’t want to delete notes. Instead, you can toggle their visibility or focus only on visible annotations.

3. Highlight notes that are currently selected

If you want to check whether your selection includes notes, try:

This can be useful for scripting operations or running batch edits on selected annotations.

4. Combine attributes for more control

NSL becomes especially powerful when you combine attribute filters:

This line identifies all visible notes whose names begin with “Comment”. Want to hide all notes that aren’t selected? Try:

Then run an operation to hide the resulting nodes.

What’s the difference between visibilityFlag and visible?

It’s an important distinction, especially for automation:

  • nt.v (visible): indicates whether the note is currently visible in the GUI.
  • nt.vf (visibilityFlag): the flag set by the system or user, which affects whether nodes are displayed—but visibility can also depend on parent nodes.

So, a node might be “visible” because both its vf is true and the parent is visible too. If not, nt.v will be false—even if vf is true.

Conclusion

When your molecular model starts filling with annotations, filtering notes is more than a convenience—it becomes a necessity. Using the NSL and targeting the note attribute space with simple yet powerful queries helps keep your analyses focused and clean.

To learn more, visit the official documentation: Note attribute space documentation.

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

Comments are closed.