When a molecular scene contains several render presets, a small naming or selection detail can make it harder to focus on the preset you mean. Node Specification Language (NSL) provides a way to identify render preset nodes by attributes, so you can describe what you want to match rather than relying only on visual inspection.
The key is to use the renderPreset attribute space. Its short name is rp, and it matches only render preset nodes. That prefix makes the intent of an expression clear: you are querying presets, not applying the same attribute name indiscriminately to every kind of node.
Start with the preset name
For a preset identified by name, use the name attribute, whose short name is n. For example:
rp.n "A"rp.n "L*"
The documentation lists strings in quotes as the possible values and provides both expressions as examples. The first is a compact way to specify a name value; the second shows a name expression containing an asterisk. If you are building a query for a particular preset, begin with the name you expect and check that the quoted text matches it.
Check selection state explicitly
Render presets inherit the selected attribute from the general node attribute space. You can test for a selected preset with rp.selected, or use not rp.selected to express the opposite. This attribute has no short name in the render preset space. In particular, do not assume that rp.s is an available shorthand here: the reference explicitly notes that selected is inherited without the short name s.
The selectionFlag attribute is also inherited, and its short name is sf. The reference gives these examples:
rp.sf falserp.sf
Both selected and selectionFlag are Boolean attributes, but they are listed separately. Treat them as distinct attributes when writing a query; do not substitute one for the other just because both concern selection-related state.
A quick troubleshooting checklist
- Confirm the node type. Use the
rpprefix when the target is a render preset. - Quote name values. The documented name values are strings in quotes.
- Use the right spelling. The full attribute is
selectionFlag; its short form issf. - Do not invent a shorthand.
selectedhas no short name in this attribute space, even though it is inherited fromnode. - Keep the two Boolean attributes separate. Check whether your query needs
selectedorselectionFlag.
These distinctions are useful when a query appears not to match the preset you intended: the issue may be the attribute space, the exact attribute name, or the value format—not the preset itself. The reference page also links to the broader NSL documentation and examples. Learn more in the render preset attribute reference.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
