Smarter Selections: Using Note Attributes to Streamline Molecular Models in SAMSON

When working with complex molecular structures, the sheer number of elements can become overwhelming. Molecular modelers often need to annotate, highlight, or temporarily hide specific parts of their model to test hypotheses or improve clarity. For example, you might leave contextual notes during an exploratory session or flag certain nodes for further inspection. But how do you actually control those note nodes efficiently?

In SAMSON, note nodes can be handled more precisely using note attributes in the Node Specification Language (NSL). Understanding how to use these attributes effectively can help eliminate navigation clutter and reduce the risk of overlooking critical annotated data.

Introducing the note Attribute Space

Note attributes are part of the note attribute space, which is abbreviated as nt when writing queries. This lets you target only those nodes that are designated as notes. For instance:

The above expression selects note nodes with a name matching “Hydrogen Bonds”.

Simplifying Control with Short Names

You can further optimize your queries with short names:

  • h for hidden
  • n for name
  • sf for selectionFlag
  • vf for visibilityFlag
  • v for visible

Using short names improves readability, especially in more complex queries.

Practical Use Case: Toggling Note Visibility

Let’s say you’ve added a number of annotations to your molecular model but now need to focus purely on atom positioning without distractions. A quick NSL query can hide all note nodes:

If you later want to only see notes that mention a specific keyword, you can do:

This selects note nodes with names containing “Active Site.” Pair that with visibility control:

This ensures you only examine visible notes relevant to your current focus.

Keep Track of Selection Flags

Note attributes support selection mechanisms with two related fields: selected and selectionFlag (sf). Though they sound similar, they serve slightly different purposes:

  • selected: Whether the node is part of the current selection in the interface.
  • selectionFlag: Typically stores whether the node has been flagged in a scripted or longer-term context.

Use this to write queries like:

Combine this with visibility flags for layers of filtering and clearer management of what’s important in your scene:

Avoiding Visual Clutter

Many molecular modelers lose valuable time zooming in and out, manually finding annotations or toggling visibility. These NSL commands allow for precision, making the modeling process cleaner and faster.

And because all the note attributes are inherited from general node attributes, those already familiar with standard NSL queries can use the same logic with minimal learning curve.

To explore the full list of note attributes and examples, 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.

Comments are closed.