When a molecular scene has several render presets, finding the one you mean can become a small but frustrating detour. A query that targets the wrong kind of node—or uses an attribute name that is not supported in that attribute space—may not express what you intended. The render-preset attribute space in SAMSON’s Node Specification Language (NSL) offers a focused way to describe render preset nodes using their names and selection-related attributes.
The key scope detail is that renderPreset, abbreviated rp, matches only render preset nodes. For a query intended to inspect presets, this gives you a clear starting point: use the rp prefix rather than assuming that an expression for another kind of node applies here.
Start with a preset’s name
The inherited name attribute is available as rp.name or its short form, rp.n. Values are strings in quotation marks. For example:
rp.n "A"rp.n "L*"
Using the full attribute name can make a query easier for a colleague to read; the short name is a more compact alternative. The documentation lists both forms and gives these example expressions. It does not define additional matching behavior for the characters in a name, so avoid assuming that a particular symbol has special meaning unless that behavior is documented elsewhere.
Check selection state with the right spelling
The attribute selected is also inherited from the node attribute space. For render presets, it can be written as rp.selected, and the example not rp.selected shows the negated form. One detail is easy to miss: this attribute does not have the short name s in the render-preset attribute space. If a query uses rp.s, it is not using the documented shorthand for this attribute.
This matters when you are translating a query pattern from another node type. Check the attribute table for the space you are actually using rather than carrying over a short form by habit. Here, the full spelling is the documented option.
Keep selected and selectionFlag distinct
The page lists selectionFlag separately, with the short name sf. Its examples are rp.sf and rp.sf false. Both selected and selectionFlag are boolean attributes, but they are separate entries in the attribute reference. When building or reviewing a query, use the name that matches the condition you mean to test; do not substitute one for the other just because both accept true or false.
A simple query-writing checklist
- Confirm that the nodes you want to match are render presets; this attribute space is limited to render preset nodes.
- Choose the documented attribute:
nfor a name,selectedfor selection state, orsffor selection flag. - Put name values in quotation marks, as in
rp.n "A". - Use
notwhen expressing the documented negative selection test:not rp.selected. - If a compact query behaves unexpectedly, compare each abbreviation with the attribute table. In particular,
selectedhas nosshorthand here.
These small checks help make a query more readable and reduce avoidable syntax guesswork, especially when adapting expressions or sharing them with someone else. For the full attribute reference and additional NSL context, see the render preset attributes documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
