When a Molecular Presentation Goes Missing: A Small NSL Checklist

A molecular scene can become difficult to inspect when you are unsure which presentation nodes are visible, hidden, selected, or simply named differently than expected. Instead of checking objects one by one, you can use SAMSON’s Node Specification Language (NSL) presentation attributes to match groups of presentation nodes by these properties.

The key detail is that the presentation attribute space—short name pr—matches only presentation nodes. Its attributes are inherited from the node space, so several familiar node properties are available here too. This makes presentation queries useful when your question is about how scene elements are presented, rather than about molecular properties.

Start with visibility

If the immediate problem is locating presentations that are currently visible, try:

pr.v

To match presentations that are not visible, use:

not pr.v

The page also lists hidden, with the short name h. You can query it with pr.h or negate it with not pr.h. Both visible and hidden are documented attributes, but they are separate names in the reference. If you need a particular result, query the attribute that matches the question you are asking rather than assuming one is simply an alias for the other.

Use names to narrow the search

When a scene contains many presentations, name matching can help you focus your search. The short name for name is n, and values are written in quotes. For example:

  • pr.n "A" looks for a presentation with the name A.
  • pr.n "L*" is an example of a name expression shown in the reference.

This is especially handy when you already know a label or naming pattern and want to inspect matching presentations without relying only on what you can see in the scene.

Check selection carefully

Presentation nodes expose both selected and selectionFlag. The documented expressions include pr.selected and not pr.selected, as well as pr.sf and pr.sf false for selectionFlag. One easy-to-miss detail: selected has no short name in the presentation space, while selectionFlag uses sf.

Because these are listed as distinct attributes, keep their names distinct in your queries. For instance, if your question is whether a presentation is selected, use pr.selected; if you specifically need to inspect its selection flag, use pr.sf. The reference identifies the available values and inheritance, but does not define further behavior for these properties, so avoid assuming they are interchangeable.

A practical troubleshooting sequence

  1. Ask what you need to find: visible, hidden, selected, or name-matched presentations.
  2. Use the pr prefix to make clear that the query targets presentation nodes.
  3. Start with one attribute at a time—for example, not pr.v for presentations that are not visible.
  4. If the result is too broad, use a name expression such as pr.n "A" as a separate narrowing step.

Keeping queries focused makes it easier to understand why a presentation matched and reduces confusion between similarly named attributes. For the complete list of presentation attributes and examples, see the SAMSON presentation attributes reference.

Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON at samson-connect.net.

Comments are closed.