Managing molecular models often involves organizing and controlling the visibility, selection, and naming of nodes within a project. For researchers and molecular designers, this can become a time-consuming process without the right tools. Thankfully, SAMSON offers solutions to streamline such tasks, and the Node Specification Language (NSL) provides powerful ways to simplify node management through the use of note attributes.
So, what exactly are note attributes? In SAMSON, the note attribute space is dedicated to managing and refining the properties of note nodes. These attributes enable users to efficiently handle node-specific properties like visibility, selection, and naming. Each attribute can be referenced using shorthand forms in NSL queries, making complex queries more compact and readable.
Key Note Attributes with Real-World Applications
Let’s explore some of the essential note attributes and how they can be used:
- hidden (
h): This attribute determines whether a node is hidden. For example, you can query hidden nodes usingnt.h, or exclude all hidden nodes withnot nt.h. - name (
n): You can filter nodes by their names or patterns. For instance,nt.n "L*"retrieves nodes with names starting withL. - selected: This attribute specifies whether a node is selected. Unlike other attributes, it doesn’t have a short name. To identify selected nodes, use
nt.selected. - selectionFlag (
sf): Use this to determine or filter nodes based on selection flags. For instance,nt.sffilters flagged nodes. - visibilityFlag (
vf): This attribute lets you work with visibility flags. For example, usent.vf falseto find nodes without visibility flags. - visible (
v): This determines whether a node is visible. A simplent.vexpression retrieves visible nodes, whilenot nt.vexcludes them.
With these attributes, users can build powerful, customizable queries, improving their ability to navigate molecular designs and adjust their workflows as needed.
Example Usage
Consider you are working with a complex molecular assembly and only want to focus on clearly visible, unselected notes whose names start with the letter “A”. With the note attributes in SAMSON, you can easily accomplish this using the query:
|
1 |
nt.v and not nt.selected and nt.n "A*" |
This command retrieves visible nodes that are unselected and whose names match the given pattern.
Simplified Workflows, Greater Efficiency
By mastering note attributes, users can significantly reduce the time and effort spent on manually locating, hiding, or tagging nodes. SAMSON provides a clean interface and comprehensive syntax to help molecular modelers execute these operations smoothly. For detailed examples and further guidance, consult the official documentation linked below.
Learn more about note attributes in SAMSON.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.
