Find the Property Model You Need Without Losing Your Place

In a busy molecular scene, the hard part is not always creating a property model—it is finding the right one again. A model may be hidden, have a similar name to another, or be difficult to distinguish by eye. SAMSON’s Node Specification Language (NSL) lets you describe property model nodes by attributes, so you can narrow the search using concrete criteria instead of relying only on visual inspection.

This guide focuses on a practical subset of the property model attribute space: names, visibility, selection state, and material-related attributes. The expressions below are the examples documented for these attributes. The important starting point is that the pm attribute space matches only property model nodes, helping keep a property-model search focused on the intended type of node.

Start with a name, then refine

If you know a model’s name, use the name attribute. Its short name is n, and values are written as strings in quotes:

  • pm.n "A"
  • pm.n "L*"

The first example shows a quoted name value; the second shows a pattern-style value included in the documentation. When you are unsure of the exact name, trying the documented pattern example can be a useful starting point. Keep the quotes: they are part of the expression format for string values.

Use visibility attributes to orient yourself

When a model is not apparent in the current view, check its visibility-related attributes. The visible attribute has the short name v, and the documented expressions are pm.v and not pm.v. These let you express a search for property models that are visible or not visible.

The inherited hidden attribute has the short name h, with examples pm.h and not pm.h. There are also explicit flags: visibilityFlag (short name vf) can be written as pm.vf or pm.vf false. These are separate attributes in the reference, so it is useful to choose the one that matches the question you are asking rather than treating the names as interchangeable.

Check selection state deliberately

Selection can help you distinguish the model you are currently working with from other property models. The documented expressions for selected are pm.selected and not pm.selected. Unlike several other inherited attributes, selected has no short name in this attribute space. Use the full form rather than assuming the node-level short name applies.

The related selectionFlag attribute has short name sf; examples include pm.sf and pm.sf false. As with visibility, the reference lists both selection state and its flag as distinct attributes. Keeping that distinction in mind can prevent confusing a search condition with a different property of the node.

Use material attributes as filters

Two inherited attributes describe material-related properties: hasMaterial (short name hm) and ownsMaterial (short name om). Their documented examples include pm.hm, not pm.hm, and pm.om. If material presence or ownership is relevant to your organization of the scene, these attributes give you a way to include them in your search criteria. The reference does not define them as synonyms, so avoid substituting one for the other without checking what you intend to identify.

A simple troubleshooting routine

  1. Begin with pm so the search is limited to property model nodes.
  2. Try the model’s known name with pm.n.
  3. If the model is hard to locate in the view, check pm.v or pm.h.
  4. If you are working from a current selection, test pm.selected.
  5. Add a material-related condition only when that distinction matters to the task.

This stepwise approach makes a query easier to understand and troubleshoot: change one criterion at a time, and keep track of whether you are asking about a node attribute or a flag. The attribute table also provides the full names, short names, value types, and examples in one place.

For the complete reference, see Property model attributes in the SAMSON documentation. For broader NSL guidance, consult the Node Specification Language page.

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

Comments are closed.