Find the Right Presentation Node Without Guesswork

A crowded molecular scene can make a small task surprisingly difficult: locating a particular presentation node, or narrowing the scene to nodes that meet a visibility-related criterion. Node Specification Language (NSL) offers a way to describe those criteria with short, readable expressions instead of relying only on visual inspection.

The key detail is that the presentation attribute space matches only presentation nodes. Its short prefix is pr. That makes it useful when your search is specifically about presentations, rather than every kind of node in the document.

Start with a clear question

Before writing an expression, decide what you want to find. Are you looking for presentations that are visible, presentations that are hidden, or one with a particular name? Keeping each search focused makes the result easier to interpret.

  • pr.v matches presentations whose visible attribute is true.
  • not pr.v matches presentations whose visible attribute is false.
  • pr.h checks the hidden attribute.
  • pr.n "A" searches by name using the example shown in the reference.
  • pr.n "L*" is another documented name expression.

For example, if you need to inspect presentations that are not currently marked visible, begin with not pr.v. If you are trying to locate a presentation by its label, use a name expression such as pr.n "A". These are search criteria: the expressions describe which nodes match; they do not, by themselves, change a node’s presentation.

Keep similarly named attributes separate

The presentation attribute space also includes visibilityFlag (short name vf) and selectionFlag (short name sf). For example, pr.vf false checks for a false visibility flag, while pr.sf false checks for a false selection flag. The page lists these alongside visible, hidden, and selected, but as distinct attributes. Avoid treating them as interchangeable: when building a search, use the attribute that matches the question you actually want to ask.

There is also a useful naming detail: selected is available as pr.selected, but the presentation attribute space does not provide the short name s for it. If you are copying an expression from another context, use the explicit form rather than assuming that a familiar abbreviation applies here.

A small workflow for a busy scene

  1. Choose the node type. Use the pr prefix when your target is a presentation node.
  2. Pick one criterion. Start with a visibility check, a flag check, or a name check rather than mixing concepts prematurely.
  3. Use the examples as templates. Try pr.v, not pr.v, pr.h, or a name expression such as pr.n "L*", depending on your task.
  4. Check the exact attribute. A query for pr.vf is a query about visibilityFlag; it is not the same expression as pr.v, which refers to visible.

This simple discipline helps make searches more reproducible: instead of remembering which object looked hidden a moment ago, you can state the attribute you want to inspect. It is also easier to revisit or share a clear expression than to reconstruct a visual search from memory.

For the complete list of presentation attributes and their documented examples, see the SAMSON presentation NSL reference.

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

Comments are closed.