Working with complex molecular models often requires a clear and efficient visualization setup. For molecular modelers, managing these visual representations can make the difference between an organized workflow and a chaotic one. SAMSON, the integrative molecular design platform, offers renderPreset attributes in its Node Specification Language (NSL) to control and customize render preset nodes efficiently. Let’s dive into what these attributes are and how they can simplify your work.
What Are Render Preset Attributes?
Render preset attributes belong to the renderPreset attribute space, which is specifically designed for render preset nodes in SAMSON. These attributes grant granular control over how nodes are rendered, helping you tailor visual representations with precision.
The renderPreset attribute space includes three key attributes:
name(short name:n): Targets nodes based on their name.selected: Determines whether a node has been selected. This attribute lacks a short name.selectionFlag(short name:sf): Reflects the selection status of a node and provides a convenient way to manage rendering for selected nodes.
How to Use Render Preset Attributes
1. Define a name for specific nodes: The name attribute allows you to identify nodes by their names. For example:
|
1 |
rp.n "A"</code> identifies <code>renderPreset</code> nodes named "A." To match multiple names, you can use wildcards, such as <code>rp.n "L*"</code>, which matches all nodes starting with "L." |
2. Leverage the selected attribute: This attribute helps you include or exclude selected nodes from specific render presets. For instance:
|
1 |
rp.selected |
This ensures only selected nodes are considered, while:
|
1 |
not rp.selected |
Excludes selected nodes from the preset.
3. Use selectionFlag for quick toggles: The selectionFlag attribute, often shortened to sf, mirrors the selection status but provides improved usability:
|
1 |
rp.sf false</code>: Matches nodes with their selection flag set to <code>false</code>. |
You can also simply use rp.sf to target nodes flagged as true.
Why These Attributes Matter
By integrating these attributes into your workflow, you can efficiently select, group, and apply visualization rules tailored to your modeling needs. This functionality can save you time and help you maintain consistency in large and complex visualizations. Whether you’re checking for selected nodes or rendering specific groups of nodes, the renderPreset attributes streamline the process significantly.
Learn More
To dive deeper into render preset attributes and access examples, visit the official documentation page at https://documentation.samson-connect.net/users/latest/nsl/renderPreset/.
SAMSON and all SAMSON Extensions are free for non-commercial use. Get your copy at https://www.samson-connect.net.
