Find the Right Presentation Without Losing Your Place

When a molecular scene gets busy, it can be surprisingly difficult to answer a simple question: which presentation nodes are visible, hidden, or selected? Searching by memory—or clicking through objects one at a time—interrupts the modeling task. SAMSON’s Node Specification Language (NSL) lets you describe the presentation nodes you want to find with short, readable expressions.

This guide focuses on a practical subset of the presentation attribute space: visibility, selection, and names. Presentation attributes match presentation nodes, and the short name for this attribute space is pr. That prefix is useful because it makes the scope of an expression explicit.

Start with the state you want to inspect

To search for presentation nodes whose visible attribute is true, use:

pr.visible or its short form pr.v

To search for presentation nodes whose visible attribute is false, use:

not pr.visible or not pr.v

The key benefit is that the second expression states the opposite condition directly. Rather than trying to remember which objects you have already inspected, you can express the condition you care about and use the resulting match as a starting point for review.

The same pattern applies to the inherited hidden attribute:

pr.hidden finds nodes matching a true hidden condition, while not pr.hidden expresses the opposite condition. The documentation lists pr.h as the short form for pr.hidden.

visible and hidden are both available attributes, but the reference page does not describe their relationship in detail. If a workflow depends on how those states interact, check the inherited node attribute documentation rather than assuming they are interchangeable.

Keep selection queries distinct

Selection-related attributes have their own names. The page lists selected and selectionFlag; they should not be treated as alternative spellings. For presentation nodes, selected has no short name, so write the full expression:

pr.selected or not pr.selected

For selectionFlag, the short name is sf:

pr.selectionFlag or pr.sf

Being precise about the attribute name matters when a search is intended to describe a particular state. If you are unsure which selection attribute fits your task, compare the two inherited attribute definitions before building the query around one of them.

Narrow the search by presentation name

Names can help turn a broad state check into a more focused search. The name attribute accepts strings in quotes. For example:

pr.name "A"

The short form is:

pr.n "A"

The reference also gives pr.n "L*" as an example. Use the documented example as a starting point when you want to include a name pattern, and consult the NSL examples if you need to confirm the matching behavior for a particular expression.

A practical habit is to build a query in small steps: first identify the presentation attribute, then add the state condition, and then add a name condition if needed. For instance, begin with pr.v when visibility is the only concern; use a name expression separately when you need to focus the search by name. This makes it easier to spot which part of an expression needs attention if the result is not what you expected.

A quick reference

  • pr.v — visible is true
  • not pr.v — visible is false
  • pr.h — hidden is true
  • pr.selected — selected is true
  • pr.sf — selectionFlag is true
  • pr.vf — visibilityFlag is true
  • pr.n "A" — name expression using the short form

For the corresponding false conditions, the page shows the general pattern of placing not before a Boolean attribute—for example, not pr.v and pr.sf false. When in doubt, use the full attribute name: it is easier to read, and the short forms are simply an optional shorthand where provided.

These expressions provide a concise way to describe which presentation nodes you want to inspect, without relying on a long sequence of manual checks. For the complete attribute reference and links to inherited definitions, see the SAMSON presentation attributes documentation.

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

Comments are closed.