A crowded molecular scene can make a simple task surprisingly difficult: finding the property model you want to inspect, or narrowing your attention to models with a particular visibility or selection state. Node Specification Language (NSL) offers a compact way to describe which property model nodes you mean. The useful trick is to treat each attribute as a separate clue, rather than assume that similar-sounding states are interchangeable.
For property models, the attribute space is propertyModel, shortened to pm. That prefix matters: expressions such as pm.v refer to property model nodes, rather than applying the same test to every kind of node. The property model attributes listed here are inherited from the general node attribute space.
Start with the question you need to answer
If your immediate question is whether a property model is visible, use the visible attribute. Its short name is v, so pm.v is the concise expression for visible property models, while not pm.v expresses the opposite condition. This gives you a direct way to distinguish the two groups without relying on names or other properties.
For selection state, the attribute is selected. For example, pm.selected matches selected property models, and not pm.selected matches those that are not selected. One detail worth remembering: unlike several other attributes in this space, selected has no short name for property models. Use the full form rather than trying to abbreviate it as pm.s.
Keep related attributes distinct
The reference also lists visibilityFlag (vf) and selectionFlag (sf). Their example expressions include pm.vf false, pm.vf, pm.sf false, and pm.sf. These are separate attributes from visible and selected. If your question is specifically about visible or selected models, use pm.v or pm.selected; if it is about a visibility or selection flag, use the corresponding flag attribute. Keeping those names straight makes an expression easier to understand and avoids silently asking a different question.
Use names when state is not enough
When you recognize a model by name, use the name attribute, abbreviated n. The reference shows quoted strings in expressions such as pm.n "A" and pm.n "L*". These examples are useful reminders to put the name value in quotes. If you are unsure whether a particular name expression matches what you intend, try it on its own before using it as part of a more involved search.
Other available checks include hasMaterial (hm) and ownsMaterial (om). For instance, pm.hm tests the hasMaterial attribute, while pm.om tests ownsMaterial. The attributes have different names, so use the one that matches the property you need to check.
A small, reliable workflow
-
Choose the kind of property model you want to identify: by name, visibility, selection, or a material-related attribute.
-
Use the
pmattribute space and the matching attribute name or short name. -
For a Boolean attribute, decide whether you want the positive condition, such as
pm.v, or its negation, such asnot pm.v. -
Check that you are using the state you actually mean:
visibleis not the same attribute asvisibilityFlag, andselectedis not the same attribute asselectionFlag.
This approach keeps NSL expressions readable and makes it easier to troubleshoot a result: each expression has a clear target and one clear attribute to inspect. For the complete property model attribute reference and additional NSL guidance, see the property model attributes documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
