Struggling with cluttered molecular scenes? Here’s a better way to selectively show notes in SAMSON.

If you’ve worked with complex molecular systems in SAMSON, you’ve probably experienced one of the most common pain points: clutter. As models grow in size and complexity, annotations like notes can become overwhelming. Whether you’re using notes to mark hypotheses, label regions of interest, or structure your thought process, visibility control is key to keeping things organized.

Luckily, SAMSON’s Node Specification Language (NSL) provides you with fine control over how and when notes are shown in your scene through powerful attributes like visible, visibilityFlag, and hidden in the nt (notes) attribute space. This blog post explains how to use these tools to clean up your visualization without deleting or modifying valuable data.

Why visibility control matters

In molecular modeling, notes can appear scattered throughout a structure—tags for residues, reminders about docked ligands, or even hypotheses about interactions. But not every note needs to be visible all the time. Selectively hiding or showing notes helps when:

  • Preparing clean screenshots for presentations or publications
  • Focusing on a specific part of a model
  • Collaborating with colleagues who need to focus on different aspects

Rather than manually clicking to hide or show individual elements, SAMSON’s NSL lets you control note visibility with simple, expressive queries.

Main attributes for controlling note visibility

Here are three key attributes that you can use to filter or manipulate visibility of notes:

1. nt.v: visible

This attribute returns whether a note is visible. You can use it to select all visible notes or hide them:

2. nt.vf: visibilityFlag

This attribute corresponds to an internal flag controlling whether visibility can be toggled. It can be used to identify notes with fixed visibility:

3. nt.h: hidden

This is inherited from general node attributes and can also help refine visibility control. For example:

How to use this in practice

Let’s say you want to clean your scene by temporarily hiding all notes related to a specific ligand labeled with names starting with “L”. You could use:

To hide them, right-click the selected notes and toggle visibility. Later on, you can select them again with the same query and toggle them back on. This method ensures precision and efficiency as your models grow more complex.

Combining these attributes can also help you detect inconsistencies in visibility settings among notes—useful during collaborative editing or model validation workflows.

Conclusion

Fine-tuned visibility control for notes in SAMSON helps you avoid visual overload and work more efficiently with complex molecular models. By leveraging nt.v, nt.vf, and nt.h, you can declutter your workspace without permanently modifying your annotations.

You can find the full documentation on note attributes in NSL 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.