When a molecular scene contains many nodes, a small organizational task can become surprisingly frustrating: finding the property model nodes you want to inspect without confusing them with other kinds of nodes. SAMSON’s Node Specification Language (NSL) provides a focused way to describe those nodes and check their properties.
This guide focuses on one useful idea: use the pm attribute space to target property models, then narrow your search with names or state attributes such as visibility and selection. The examples below use only expressions shown in the property model attribute reference.
Start with the right node type
The propertyModel attribute space has the short name pm and matches only property model nodes. That gives you a useful boundary: expressions such as pm.v or pm.n "A" are about property models, rather than nodes generally.
This matters when a scene includes several kinds of objects with similar names or states. Instead of beginning with a broad attribute and trying to work out what it matched, begin with the property model space. It makes the intent of an expression easier to read later, too.
Use names to make a focused search
The name attribute accepts strings in quotes. The reference gives pm.n "A" and pm.n "L*" as examples. These are useful patterns to keep at hand when you know the label you are looking for, or want to try a name expression from the documented examples.
Keeping the value in quotes makes the string portion of the expression explicit. If you are sharing an expression with a colleague, a clear name-based query can also help explain which property model you intended to find.
Check visibility and selection state
Property models inherit several state attributes from the general node attribute space. For visibility, the documented examples are pm.v and not pm.v. They let you express the two sides of a simple check: visible property models, or property models that are not visible.
For hidden state, the examples are pm.h and not pm.h. The page also lists visibilityFlag, with the short name vf, and shows pm.vf false and pm.vf. These attributes are all available in the property model space; the reference identifies them as inherited from node.
Selection is similar: pm.selected and not pm.selected are the documented forms. One detail that is easy to overlook is that selected does not have the short name s in the property model space, even though it is inherited from node. Use the full attribute name for this check.
The reference also lists selectionFlag with the short name sf, and provides pm.sf false and pm.sf as examples. If you are unsure which state attribute fits your task, consult the specific attribute entry rather than assuming that similarly named attributes are interchangeable.
A practical way to build a query
-
Decide that you want property model nodes specifically, and use the
pmprefix. -
If you know a relevant label, start with a name expression such as
pm.n "A". -
For a visibility or selection check, refer to the documented examples:
pm.v,not pm.v,pm.selected, ornot pm.selected. -
Keep the expression simple while checking what it identifies. The attribute reference documents these individual expressions; it does not specify combined-query behavior on this page.
That last point is a useful habit: build from documented pieces and verify the result in your own scene, rather than relying on a guessed interpretation of an attribute. The short names can make expressions compact, while the full names can be easier to understand when revisiting them later.
For the complete attribute list and its examples, see the SAMSON property model attributes reference.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
