When working on molecular modeling and visualization, one of the common challenges researchers face is ensuring that the visual representation of their structures accurately reflects their requirements. Whether you are highlighting specific elements for better insight or customizing visual properties for your purposes, SAMSON’s renderPreset attributes in the Node Specification Language (NSL) provide a valuable toolkit for fine-tuning the visual aspects of your molecular models.
This blog post delves into the render preset attribute space, a part of NSL specifically designed to match render preset nodes. Render presets enable detailed control over how your molecular models are visualized, helping you create clear and effective representations.
What Are Render Preset Attributes?
The renderPreset attribute space (short name: rp) in NSL is a group of attributes that cater specifically to the customization of render nodes in SAMSON. These attributes can fine-tune properties like naming presets, selection states, and specific flags for visualization.
The following table summarizes the key attributes within this space:
| Attribute Name | Short Name | Possible Values | Examples |
|---|---|---|---|
| name | n |
strings in quotes | rp.n "A"rp.n "L*" |
| selected | (no short name) | true, false |
rp.selectednot rp.selected |
| selectionFlag | sf |
true, false |
rp.sf falserp.sf |
Attributes Explained
name
The name attribute (short name: n) is inherited from the general node.name attribute space. It allows you to match render presets by their names. For instance:
rp.n "A": Matches render presets with the exact name"A".rp.n "L*": Matches render presets whose names start with"L", as the wildcard*is used.
selected
The selected attribute indicates whether a render preset node has been selected or not. Unlike the equivalent selected attribute in the general node space, this has no short name in the renderPreset context. Some basic use cases include:
rp.selected: Matches all selected render preset nodes.not rp.selected: Matches render preset nodes that are not selected.
selectionFlag
The selectionFlag attribute (short name: sf) provides an additional tool for managing render presets. It helps match nodes based on whether their selection flag is set or not, with examples including:
rp.sf: Matches render preset nodes with a set selection flag.rp.sf false: Matches render preset nodes without a set selection flag.
Optimize Your Molecular Visualization Workflow
The renderPreset attribute space offers a streamlined way to enhance molecular visualizations in SAMSON. By leveraging attributes like name, selected, and selectionFlag, you can navigate, filter, and apply modifications to render presets efficiently, saving valuable time and ensuring your models are tailored to your visualization needs.
For a detailed overview of all renderPreset attributes, their syntax, and examples, visit the official documentation page: Render Preset Attributes.
SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON here: https://www.samson-connect.net.
