Molecular modelers often operate in complex environments where managing node attributes effectively can introduce clarity and precision into workflows. In SAMSON’s Node Specification Language (NSL), the “note” attribute space is an essential tool that allows you to define and filter properties for note nodes. If you’ve been seeking ways to better navigate attributes like visibility, naming, and selection states, this guide will help you make sense of the intricacies involved.
What Are Note Attributes?
In SAMSON’s NSL, “note” nodes come with a specialized attribute space that is referred to simply as note. With note, you gain precise manipulation capabilities for attributes such as visibility, name, selection flags, and more.
The short name for the note attribute space is nt, making it easy to reference note-related operations in compact expressions. This works exclusively with note nodes, streamlining attribute specification in your molecular modeling tasks.
Key Note Attributes Explained
Let’s dive deeper into some of the most commonly used attributes within the note space and how they can help you:
-
Visibility
The visibility of nodes can be controlled in multiple ways:
nt.visible (v): Use this to check whether a note node is visible (true) or not (false).nt.visibilityFlag (vf): Set or check visibility flags to toggle visibility dynamically.
For example, you can find all visible notes using:
1nt.vOr inverse the query through:
1not nt.v -
Name
Every note node can carry a unique name, helping you to organize your modeling efforts. The
nt.name (n)attribute supports string matching to search for notes:1nt.n "A"You can also use patterns for broader searches:
1nt.n "L*" -
Selection State
Attributes like
nt.selected(indicating if a node is selected or not) play a crucial role in managing your workflow. Combined with flags likent.selectionFlag (sf), this allows granular operations:1nt.sf falseYou could also filter out only selected nodes:
1nt.selected
How Do These Attributes Interact?
By using combinations of note attributes, molecular modelers can query, highlight, or filter nodes more effectively. For instance, you can combine visibility and naming to target all visible nodes with a specific name pattern:
|
1 |
nt.v and nt.n "Pattern*" |
This kind of precise filtering aids in managing complex molecular designs without distractions from irrelevant data.
Learn More
If you’d like to delve deeper into these attributes, along with examples of their use, check out the official SAMSON documentation on note attributes. Clear documentation and examples will help you quickly implement these capabilities in your molecular modeling work.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
