When a molecular scene contains many kinds of nodes, a broad search can return more than you intended. That makes a simple task—such as locating property models with a particular name or checking their visibility state—harder to reason about. In SAMSON’s Node Specification Language (NSL), the propertyModel attribute space gives you a way to write expressions specifically for property model nodes.
The key is the attribute-space prefix: pm. It is the short name for propertyModel, and attributes in this space match only property model nodes. Instead of relying on a general node attribute, start an expression with pm when your target is specifically a property model.
Start with the question you need to answer
For a name-based check, the attribute is name, shortened to n. The documentation’s examples are:
pm.n "A"pm.n "L*"
These examples show that the name value is written in quotes. Keeping the pm prefix in place is useful when you want the expression to stay scoped to property models, rather than matching a different kind of node with a similar name.
Check visibility without mixing up the attributes
Property models inherit several boolean attributes from the node attribute space. For visibility-related checks, the reference lists visible (short name v), hidden (short name h), and visibilityFlag (short name vf). The documented examples include:
pm.vandnot pm.vpm.handnot pm.hpm.vfandpm.vf false
These are distinct attribute names, so it is worth choosing the one that matches the question you mean to ask. For example, use pm.v when you want to test the documented visible attribute. If you are checking the flag itself, use pm.vf. The reference identifies both as boolean-valued attributes; it does not describe them as interchangeable.
Selection has one easy-to-miss exception
The selected attribute is inherited too, and can be expressed as pm.selected or not pm.selected. However, unlike the node attribute space, it has no short name in the property model attribute space. So although other entries offer compact forms such as pm.n or pm.v, use the full spelling pm.selected for selection state.
A practical way to avoid a wrong-target expression
- Confirm that the objects you want are property model nodes.
- Begin with
pmto scope the attribute to that node type. - Choose the exact attribute: for example,
nfor name,vfor visible, or the fullselectedfor selection state. - Use the examples in the reference as a syntax check, especially for quoted names and explicit boolean values.
This small habit makes expressions easier to inspect later: the prefix tells you what kind of node you are targeting, and the attribute tells you what property you are testing. It is especially helpful when a query looks plausible but returns an unexpected set of nodes.
For the complete attribute list and examples, see the property model attributes reference.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
