Find the Right Presentation Nodes Without Losing Your Place

When a molecular scene gets crowded, a small task can become surprisingly distracting: finding the presentation nodes you want to inspect, or narrowing attention to nodes that are visible, hidden, or selected. SAMSON’s Node Specification Language (NSL) lets you describe those properties as search expressions, so you can focus on a useful subset instead of scanning the scene manually.

This guide covers the presentation attribute space. Its short name is pr, and it matches presentation nodes. The attributes shown here are inherited from the more general node attribute space. That means you can use familiar node properties while explicitly targeting presentation nodes.

Start with a simple question

Before writing an expression, decide what you need to find. Is the issue visibility? Selection state? A node name? Keeping the question specific makes the expression easier to read and helps avoid mixing up attributes that have similar-sounding names.

  • Find visible presentation nodes: pr.v
  • Find presentation nodes that are not visible: not pr.v
  • Find hidden presentation nodes: pr.h
  • Find presentation nodes that are not hidden: not pr.h

The visibility and hidden attributes are listed separately. If you need one particular state, query the attribute that names that state rather than assuming the two are interchangeable. The expressions above are useful starting points when you want to check or narrow down what is currently represented in a scene.

Use selection properties deliberately

Selection-related attributes provide several ways to describe a presentation node. To query whether it is selected, use pr.selected or not pr.selected. The selected attribute does not have the short name s in the presentation attribute space.

There is also selectionFlag, with the short name sf. Its documented examples are pr.sf and pr.sf false. Because selected and selectionFlag are separate attributes, keep their names explicit in your expression. That small habit makes a query easier to review later, especially when you return to a model after a break.

Narrow results by name

If you know a presentation node’s name, the name attribute can help target it. Use the short name n followed by a string in quotes. The reference gives pr.n "A" and pr.n "L*" as examples.

Keeping the value in quotes is important: the name is supplied as a string. If you are unsure what a name expression will match in your scene, try a simple, specific value first and inspect the results. The reference lists these expressions but does not define additional pattern-matching rules, so avoid assuming that special characters behave in a particular way without checking them in your workflow.

A practical way to build an expression

  1. Choose the node type: start with pr to target presentation nodes.
  2. Choose one property: use v, h, selected, sf, vf, or n, depending on the question.
  3. Use the documented value form: Boolean properties accept true or false; names are strings in quotes.
  4. Check the expression against your scene: if the result is not what you expected, simplify the query and verify each attribute separately.

For example, when you are troubleshooting a crowded view, begin with pr.v to focus on visible presentation nodes. If you instead need to inspect what is not visible, try not pr.v. If your task is about a particular name, use the name attribute rather than relying on visual recognition alone. These small, targeted queries can make scene inspection more systematic.

For the full attribute table and reference details, see the SAMSON presentation attributes documentation.

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

Comments are closed.