When working on complex molecular models in SAMSON, visual clarity can quickly become a challenge. Whether you’re preparing a scene for publication, for collaboration, or simply managing multiple layers of molecular systems, you may find yourself needing to precisely control and interact with render presets—those configurations that define how molecular nodes are visually displayed.
You’ve probably encountered this frustration: you set up a beautiful scene with multiple visual styles (e.g., one for ligands, one for proteins, one for the solvent layer), but when trying to isolate or select just a few render presets, the filtering feels opaque. How do you avoid clicking blindly through dozens of nodes just to find that one preset named “LIPO_SURFACE”?
That’s where NSL (Node Specification Language) steps in. And more specifically, SAMSON offers you attribute-based expressions to target render presets reliably using simple logic statements. In this post, we’ll take a closer look at how to specify and manipulate render preset nodes using a few key attributes defined by the NSL.
What is a Render Preset Node?
A render preset node defines a visual representation—such as a specific surface rendering or particle style—for another node in your model. In SAMSON, it’s part of a node tree and can be selected through expressions in the renderPreset or rp attribute space.
Key Attributes for Render Presets
The following attributes help you filter and select render preset nodes in SAMSON using the NSL:
| Attribute | Short Name | Values | Examples |
|---|---|---|---|
| name | n |
strings in quotes | rp.n "Hydration"rp.n "L*" |
| selected | true, false |
rp.selectednot rp.selected |
|
| selectionFlag | sf |
true, false |
rp.sf falserp.sf |
Practical Use Cases
Here are a few tasks made easier with these attributes:
- Quickly find all selected render presets by using:
rp.selected - Exclude all selected presets (useful if you made a mistake while selecting):
not rp.selected - Search for visual styles by name patterns:
rp.n "Surf*"to capture all presets beginning with “Surf”
This makes it easier to group, modify, or delete render presets without searching through the node tree manually.
Small Differences That Matter
For consistency with other node types, all these attributes are inherited from the generic node attribute space. However, it’s important to note subtle differences:
selectedis inherited but has no short name forrp(unlike some other nodes that uses)selectionFlagdoes support the short namesf
This allows you to adapt your search expressions depending on whether you’re working with render presets specifically or applying logic across multiple node types.
Final Thought
Gaining control over render presets using NSL offers both practical value and peace of mind. You’ll save time, reduce misclicks, and focus more on the science than on interface hurdles. The learning curve is small, and once you build these expressions into your workflow, managing scenes in SAMSON feels effortless.
Learn more about the renderPreset attribute space in the documentation.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON here.
