Find the right property model without losing track of visibility and selection

A crowded molecular scene can make a small task surprisingly frustrating: you want to inspect property models, but the scene also contains many other kinds of nodes, and visibility or selection state can make it harder to tell what you are looking at. SAMSON’s Node Specification Language (NSL) provides a way to describe property model nodes by their attributes, so you can express what you want to find instead of relying only on visual inspection.

The key starting point is the attribute space propertyModel, abbreviated pm. It matches only property model nodes. That matters when your search is intended to concern property models specifically: using the right attribute space helps keep the query focused on the right kind of node.

Start with the question you are trying to answer

Before writing an expression, translate the task into an attribute. Are you looking for a property model by name? Do you want to check whether it is visible, hidden, or selected? The property model attribute reference lists the available names, short forms, possible values, and examples.

For example, these expressions refer to visibility and hidden state:

  • pm.v or not pm.v for the visible attribute
  • pm.h or not pm.h for the hidden attribute

The expressions use the documented true/false form. When a result is unexpected, check that you are querying the attribute you mean: visible and hidden are separate attributes in the reference, so don’t assume that one is simply a substitute for the other.

Use names when visual identification is unreliable

If several property models look alike in the scene, filtering by name can be more dependable than trying to identify them by appearance. The full attribute name is name; its short form is n. The reference gives examples such as pm.n "A" and pm.n "L*". Keep the value in quotes, as shown. If you are unsure which name expression is appropriate, start with a known model name and compare it with the examples in the NSL reference.

Don’t confuse selected state with selection flags

The property model attribute space includes both selected and selectionFlag. The documented examples are pm.selected and not pm.selected for selection, and pm.sf or pm.sf false for the selection flag. One small but useful detail: selected has no short name in the property model attribute space. Use the full form rather than assuming that the node-level short name s applies here.

Other inherited attributes can help narrow a search: pm.hm refers to hasMaterial, and pm.om refers to ownsMaterial. The reference also lists visibilityFlag (vf). These attributes are inherited from the general node attribute space, so their detailed behavior is documented there; use the property model page as a quick index, and consult the linked node documentation when you need the full definition.

A practical way to build a query

  1. Begin with pm so the query targets property model nodes.
  2. Choose one attribute that directly describes your goal, such as pm.n "A" for a name-based search or pm.v for visibility.
  3. Use the exact short name and value format listed in the reference. For boolean attributes, check whether the example uses a bare attribute or an explicit value such as false.
  4. If the result is not what you expected, verify the attribute spelling and whether the property model version provides a short name for it.

This approach is useful because it turns a vague visual task into a clear question about node type and attributes. It also makes the search easier to review later: the expression tells you whether you were looking for a name, a visibility state, or a selection-related property.

For the complete attribute table and links to the inherited node attributes, see the property model attributes documentation.

Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.

Comments are closed.