When a molecular scene contains many nodes, narrowing down the right objects can be harder than expected. A common source of confusion is using an attribute that belongs to a different kind of node—or assuming a shorthand is available everywhere. SAMSON’s Node Specification Language (NSL) provides a focused way to describe property model nodes and inspect their attributes.
Start with the property model namespace
Property model attributes live in the propertyModel attribute space, whose short name is pm. This namespace matches only property model nodes. That gives you an important first check: if your expression begins with pm, you are describing property models, not every node in the scene.
For example, the documented expressions pm.h and pm.v refer to the hidden and visible attributes of property model nodes. Their negated forms, not pm.h and not pm.v, express the corresponding opposite conditions. These examples are useful when you want to distinguish nodes by their hidden or visible state.
Use names to narrow the search
If you know a property model’s name, the name attribute can make a broad search more specific. The reference shows expressions such as pm.n "A" and pm.n "L*". The short form n stands for name, and the name value is written in quotes. When adapting an example, keep the quotes around the value; they make it clear that the criterion is a string.
This is especially handy when you remember only part of a label. The documentation includes "L*" as an example, so it can serve as a starting point for exploring name-based matching in your own scene. If a name expression does not return what you expect, check both the namespace (pm) and the quoted value before changing other criteria.
Know which short forms are available
Most of the listed property model attributes have short names: hm for hasMaterial, h for hidden, n for name, om for ownsMaterial, sf for selectionFlag, vf for visibilityFlag, and v for visible. The table also lists selected, but it has no short name in this attribute space. Use the full form, as in pm.selected or not pm.selected.
That exception matters when you are adapting expressions from another node type. The page explains that selected is inherited from the node attribute space, but without the short name s. So for property models, write pm.selected, rather than assuming pm.s is supported.
Keep related attributes distinct
The attribute list includes both visible and visibilityFlag, as well as selected and selectionFlag. They are separate entries with different names and, where available, different short forms: v and vf, or the full name selected and sf. If you are building a query, choose the attribute whose name matches what you intend to test instead of treating these pairs as interchangeable.
Similarly, hasMaterial and ownsMaterial are separate attributes, abbreviated as hm and om. The reference lists true and false as possible values for these state-like attributes, with examples including pm.hm, pm.om, and pm.sf false. You can use the documented forms as a compact checklist when deciding which property model attribute is relevant.
A quick expression checklist
- Confirm that you are targeting property model nodes with the
pmnamespace. - Use a listed short name when available, or the full attribute name when it is not.
- Put string values for
namein quotes. - Check whether your condition should be positive or negated, as in
pm.vversusnot pm.v. - Keep similarly named attributes distinct, especially
visible/visibilityFlagandselected/selectionFlag.
These small checks help prevent a query from silently targeting the wrong node type or attribute. For the complete property model attribute reference and its examples, see the SAMSON property model attributes documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
