Finding the Camera Nodes in a Crowded Molecular Scene

When a molecular scene contains many kinds of nodes, finding the camera nodes you need to inspect can become a small but distracting task. SAMSON’s Node Specification Language (NSL) provides a focused way to describe them: the camera attribute space, abbreviated ca, matches only camera nodes. That gives you a useful starting point for writing camera-specific queries instead of mixing them with criteria for other node types.

Start with the camera scope

In an NSL expression, ca tells the query to use camera attributes. The camera page lists three available attributes: name, selected, and selectionFlag. These are inherited from the general node attribute space, but the camera reference explains how to use them in the camera context.

The scope is useful when you want your expression to be about cameras specifically. For example, rather than thinking only “find a node with this name,” you can express “find a camera node with this name” using ca.n "A". The camera scope makes the intent legible when you revisit the expression later, too.

Use names to narrow the search

The full attribute name is name, and its short name is n. Values are written as strings in quotation marks. The reference gives these examples:

  • ca.n "A"
  • ca.n "L*"

These examples show how to express a camera-name criterion, including a quoted value containing an asterisk. If you are unsure how a particular pattern is interpreted in your workflow, check the NSL examples rather than assuming wildcard behavior from the character alone. A clear, deliberate name criterion can make camera-related queries easier to read and maintain.

Check selection-related attributes

The camera attribute list also includes selected and selectionFlag. The reference shows ca.selected as an expression for the selected state, and not ca.selected for its opposite. Unlike some inherited attributes, selected has no short name in the camera attribute space, so use the full word.

For selectionFlag, the short name is sf. The documentation examples are ca.sf false and ca.sf. Keeping these forms in mind helps avoid a common bit of friction: the camera attribute space does not use the same shorthand for every attribute. In particular, ca.s is not listed as a camera expression for selected; write ca.selected.

Both selection-related attributes are inherited from the node attribute space. The camera reference identifies them as separate attributes but does not explain their deeper behavioral differences. If you need to understand when to use one rather than the other, consult the node attribute documentation instead of treating them as interchangeable.

A small checklist for readable camera queries

  1. Begin with ca when the intended nodes are cameras.
  2. Use ca.n or ca.name for a name criterion, with the string in quotes.
  3. Use ca.selected or not ca.selected for the selected-state expressions shown in the reference.
  4. Use ca.sf or ca.sf false for the documented selection-flag forms.
  5. When an expression’s meaning is not clear from these examples, verify it in the NSL reference rather than guessing.

This is a compact attribute space, but knowing its exact names and examples can save time when you need to isolate cameras or make a query understandable to a collaborator. For the complete reference, see the SAMSON camera attributes documentation. You can also explore the NSL overview and its examples.

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

Comments are closed.