Efficient molecular modeling often requires precise visualization and selection of components within a molecular system. For molecular modelers and designers, quickly hiding, showing, or tagging specific elements can make workflows considerably smoother. In SAMSON’s Node Specification Language (NSL), presentation attributes provide a versatile way to manage these tasks.
This guide focuses on helping you better understand how to control the appearance and selection of presentation nodes using pr, the short name for the presentation attribute space. These attributes are specific to presentation nodes and include essential features like visibility, selection, and naming.
Key Features of Presentation Attributes
The following are the most notable presentation attributes available to enhance your workflow:
- Hidden (
pr.h): Toggles whether a node is hidden. Acceptstrueorfalsevalues.
Examples:pr.h,not pr.h - Name (
pr.n): Assigns a custom identifier to a node using strings in quotes.
Examples:pr.n "A",pr.n "L*" - Selected: Marks a node as selected or not selected. Similar to its
nodeequivalent but without a short name.
Examples:pr.selected,not pr.selected - SelectionFlag (
pr.sf): Denotes a selection flag (can be toggled betweentrueandfalse).
Examples:pr.sf false,pr.sf - VisibilityFlag (
pr.vf): Controls the visibility of a node (acceptstrueorfalse).
Examples:pr.vf false,pr.vf - Visible (
pr.v): Defines whether a node is visible or not.
Examples:pr.v,not pr.v
How These Attributes Streamline Your Workflow
Let’s break down why these features matter. Imagine working on a complex macromolecular assembly. Without precise control over what is visible, selected, or tagged, keeping track of components can become overwhelming. By using the presentation attributes, you can:
- Focus on specific structures: Toggle visibility to hide irrelevant nodes (
pr.v,pr.vf). - Tag and locate nodes: Use the
pr.nattribute to assign easy-to-remember names to molecular components, making it much easier to search for them. - Streamline workflows: Predefine selections or visibility attributes (
pr.sf,pr.selected) for quicker setup in future sessions. - Keep interfaces clutter-free: Hide nodes that do not contribute to immediate tasks with
pr.h.
Quick Reference Table
| Attribute | Short Name | Values | Examples |
|---|---|---|---|
| Hidden | h |
true, false |
pr.h, not pr.h |
| Name | n |
Strings (in quotes) | pr.n "A", pr.n "L*" |
| Selected | – | true, false |
pr.selected, not pr.selected |
| SelectionFlag | sf |
true, false |
pr.sf false, pr.sf |
| VisibilityFlag | vf |
true, false |
pr.vf false, pr.vf |
| Visible | v |
true, false |
pr.v, not pr.v |
Putting It Into Practice
By mastering presentation attributes, molecular modelers can significantly reduce the complexity of their projects and create cleaner, more tailored views of their systems. Whether you are preparing a visualization for a publication or simply organizing molecular components for design, these attributes offer the flexibility needed to enhance your productivity.
To explore all the details, visit the full SAMSON NSL Presentation Attributes Documentation.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at SAMSON Connect.
