Quickly See or Hide Molecular Animation Nodes with SAMSON’s Visibility Attributes

When working with complex molecular systems, animations can quickly become overwhelming. Whether you’re presenting a molecular mechanism or simply analyzing the evolution of conformations, showing or hiding individual animation nodes efficiently helps you stay focused on what really matters.

In the Node Specification Language (NSL) of SAMSON, visibility control is made easy through a set of logical, filterable attributes associated with animation nodes. In this post, we’ll focus on how to use the visible (v) and hidden (h) attributes to filter only what you want to see.

Common Pain Point

Imagine this: you’re visualizing a protein conformational pathway involving several intermediates, transitions, and associated electron density maps. There are dozens of animation nodes in your document. However, you only want to focus on the visible ones, or perhaps temporarily hide all non-relevant parts.

Scrolling through the Document View and toggling checkboxes can be tedious and error-prone. That’s where NSL queries save time. By combining filters like an.v (visible=true) or not an.v (visible=false), you can instantly isolate the subset of nodes that matter.

What You Can Do

  • Retrieve only visible animation nodes:
    an.v
  • Retrieve only hidden animation nodes:
    not an.v OR an.h
  • Display animations with specific names that are visible:
    an.v and an.n "Transition*"
  • Hide everything and show only what’s currently selected:
    First hide all: not an.v
    Then show selected: an.selected

What’s powerful is not just that you can write these filters, but that the result is immediately visual. This saves tremendous time compared to manually enabling or disabling visibility for each node.

What’s Under the Hood?

Internally, the visible attribute (an.v) is inherited from parent node.visible, providing a boolean response depending on whether the animation node is currently shown in the viewport.

The hidden attribute (an.h) and visibilityFlag (an.vf) provide even finer control in combination with logical operations, which can be useful especially in Python scripting or when building reusable node queries.

Working Smarter, Not Harder

Instead of navigating through long lists of animation items, use visibility filters to:

  • Automate selection workflows
  • Quickly isolate parts of an animation for image or video export
  • Identify hidden elements that might cause confusion in a collaborative session
  • Combine NSL queries with scripting for batch processing

Even if you’re new to NSL, these visibility attributes provide a gentle and effective entry point into streamlining how you interact with your data in SAMSON.

To learn more, visit the official documentation page on Animation Attributes in SAMSON NSL.

SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.

Comments are closed.