Molecular modelers often need to manage and customize data linked to specific nodes in a complex molecular model. This can be a daunting task without the right tools, especially when dealing with properties across numerous note nodes. Thankfully, SAMSON’s Node Specification Language (NSL) offers a well-structured solution, allowing users to define note attributes intuitively. Let’s dive into how you can leverage these attributes effectively.
Why Note Attributes Matter
In SAMSON, notes serve as descriptive or organizational entities tied to your molecular model. Whether you need to flag specific nodes for visibility, specify custom names, or manage selection properties, note attributes help streamline your workflow. Understanding how to use these attributes can save you time and prevent errors, especially in large-scale models.
Exploring the Attribute Space
The note attribute space (short name: nt) focuses exclusively on note nodes. This makes it easier to apply filters or perform operations specific to these entities. Here’s a breakdown of the key attributes:
1. hidden (h)
The hidden attribute helps control whether a note node is hidden (true) or visible (false). For instance:
- To identify hidden notes:
nt.h - To exclude hidden notes:
not nt.h
2. name (n)
Adding custom names to nodes can make your model more informative. The name attribute can filter note nodes by their string-based names. For example:
- Select all notes named “A”:
nt.n "A" - Use wildcards to match patterns:
nt.n "L*"
3. selected
selected specifies whether a note node is part of the current selection. This attribute is inherited from the broader node attribute space but lacks a short name. Use it like so:
- Find selected nodes:
nt.selected - Exclude selected nodes:
not nt.selected
4. selectionFlag (sf)
Like selected, this flag is mostly useful for filtering based on whether the note is flagged for selection purposes.
- Unflagged notes:
nt.sf false - Flagged notes:
nt.sf
5. visibilityFlag (vf)
visibilityFlag determines whether a note node’s visibility is flagged. Combine this with hidden for precise visibility control:
- Unflagged visibility:
nt.vf false - Flagged visibility:
nt.vf
6. visible (v)
Finally, the visible attribute ensures nodes are currently displayed in the model:
- Visible notes:
nt.v - Invisible notes:
not nt.v
In Practice: Combining Attributes
Understanding single attributes is just the start. Combining them really unlocks the power of the NSL. For example:
- Find all visible and selected note nodes:
nt.v and nt.selected - Exclude hidden notes from your search:
not nt.h and nt.n "B*"
Experiment with these combinations to customize your workflows effectively.
Learn More
If you want to learn more about how to manage note attributes in SAMSON, be sure to check out the official documentation page at https://documentation.samson-connect.net/users/latest/nsl/note/.
SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON today at https://www.samson-connect.net.
