When a molecular scene has several render presets, it can be easy to lose track of which one you mean. A preset may have a useful name, or it may be the one marked selected—but remembering names and checking nodes one by one can interrupt your modeling workflow. SAMSON’s Node Specification Language (NSL) provides a compact way to describe render preset nodes by their attributes.
The key is to use the renderPreset attribute space, whose short name is rp. This attribute space matches only render preset nodes. That makes it a useful starting point when you want a query to focus on presets rather than nodes of other kinds.
Start with the preset name
Names are often the easiest clue to recognize. The name attribute has the short name n, and its values are written in quotes. For example:
rp.n "A"refers to a preset name written asA.rp.n "L*"is another documented name expression.
If you know the label you are looking for, a name-based expression can help make your intent explicit. The documentation lists both rp.n and rp.name as ways to refer to the name attribute. It includes "L*" as an example, but consult the NSL reference for the exact behavior of name matching rather than assuming how the asterisk is interpreted.
Check selection state deliberately
Two Boolean attributes are available: selected and selectionFlag. Both can be tested with true or false, but they are distinct attribute names. The page gives these examples:
rp.selectednot rp.selectedrp.sfrp.sf false
There is a small but useful syntax detail here: selected has no short name in the render preset attribute space. Use rp.selected, not a presumed abbreviation. By contrast, selectionFlag can be shortened to sf, so rp.sf is available.
When building a query, choose the attribute that matches the question you actually want to ask. For example, use rp.selected when checking the selected state, and use rp.sf when checking the selection flag. The reference identifies these as separate attributes; don’t treat one as a synonym for the other.
A practical way to compose a search
Think of a render-preset query in three steps: first narrow the target to render presets with the rp space; then identify the preset using its name if that is helpful; finally, add a Boolean condition if selection state matters. Keeping these questions separate makes expressions easier to read and troubleshoot. If a query does not return what you expect, check the attribute spelling, whether a short name is actually documented, and whether a value such as a name is quoted.
These attributes are inherited from the general node attribute space. That means the render preset reference is a focused view of node attributes applied to render preset nodes, not a separate list of unrelated properties. The page documents name, selected state, and selection flag; it does not describe controls for changing how a preset renders.
For the full attribute table and examples, see the render preset attributes reference.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
