In a busy molecular-design scene, the hard part is not always creating a model—it is finding the right model again. Several property models may be present, hidden, visible, or selected, and a broad search can make it difficult to focus on the node you mean. SAMSON’s Node Specification Language (NSL) provides a way to describe property model nodes using attributes such as name, visibility, and selection state.
The useful starting point is scope. The propertyModel attribute space, abbreviated pm, matches only property model nodes. That makes pm a helpful prefix when your task concerns property models specifically, rather than nodes in general. For example, pm.h tests the inherited hidden attribute on property models, while pm.v tests visible.
Use the name to narrow your search
If you know a model’s name—or part of its naming pattern—start with the name attribute. The short form is n, so the documentation’s examples include pm.n "A" and pm.n "L*". Keep the name in quotes, as shown. This can be a practical first step when a scene contains several property models and you want to distinguish them by their labels.
Names are not the only useful clue. The property model attribute list also includes inherited attributes for whether a node has material or owns material: pm.hm and pm.om. These are separate checks. If you are investigating a model’s material-related state, use the attribute that matches the question rather than assuming that the two names mean the same thing.
Visibility and selection are different checks
For a quick visibility check, use pm.v; to test for the opposite state, use not pm.v. The longer attribute name is visible, and its short form is v. The inherited hidden attribute has its own short form, h, with examples pm.h and not pm.h. Because the reference lists visibility and hidden as distinct attributes, it is clearer to query the one relevant to your task instead of treating their names as interchangeable.
Selection also has its own attribute: pm.selected, or not pm.selected. One small but useful detail: unlike several other attributes in this list, selected has no short name in the property model attribute space. Use the full word, not pm.s. The separate selectionFlag attribute does have the short form sf, with examples pm.sf and pm.sf false. The reference lists both attributes, so keep the distinction in mind when writing a query.
A small checklist before querying
- Begin with
pmwhen you want to target property model nodes. - Use
pm.nwith a quoted string when narrowing by name. - Choose
pm.vorpm.haccording to whether you are checking visibility or hidden state. - Write
pm.selectedin full; this attribute has no short name here. - Keep flags such as
pm.sfandpm.vfdistinct from the selection and visibility attributes.
These compact expressions can make a crowded scene easier to reason about: identify the kind of node first, then choose the attribute that answers your specific question. For the complete attribute reference and additional NSL examples, learn more in the property model documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
