Making Your Visual Models Work for You: Controlling Visibility in SAMSON

When working on complex molecular systems, it’s common to feel overwhelmed by the sheer number of visual elements on the screen. Whether you’re analyzing a specific interaction site or preparing a figure for publication, being able to control which visual elements are shown—and which are hidden—can make a big difference in both clarity and productivity.

In SAMSON, the Visual Model system offers detailed visibility controls that let you manage what gets displayed. This post focuses on a subset of SAMSON’s Node Specification Language (NSL)—specifically, attributes that let you control visibility. These small tools can be powerful aids in managing the visual complexity of your scene.

VM Attributes That Influence Visibility

When working with visual model nodes in SAMSON, you can query and filter using the following NSL attributes related to visibility:

  • vm.h (hidden): whether the visual model is hidden
  • vm.v (visible): whether it is visible
  • vm.vf (visibilityFlag): whether the flag is set for visibility

These attributes help you control whether a visual model is seen, nested inside logic statements that allow for flexible selection and filtering. Here’s an example:

This selects all visual models that are not hidden.

This selects visual models whose visibility flag is explicitly set to false.

Why Use Both hidden and visible?

You might wonder why there are both vm.h (hidden) and vm.v (visible) attributes. While they may seem redundant, advanced users can benefit from this flexibility. For instance, you might want to track elements that are programmatically visible but manually hidden by the user—or vice versa.

Practical Use Cases

1. Cleaning Up Your Scene

You can quickly isolate visible elements in the scene using:

This includes only visual model nodes that are currently visible—which is especially helpful when you work with large assemblies or multiple render styles.

2. Focused Editing

Want to hide everything except a specific type of visual model? First, identify and tag the models of interest, then use a query like:

to identify and batch-hide others, reducing screen clutter during editing or annotation.

3. Debugging Visibility Issues

If something doesn’t appear on screen, use:

to catch all visual models that aren’t showing. You can use this to verify which components are hidden due to flags or user settings and adjust accordingly.

Tips for Efficient Use

  • Combine multiple visual attributes (e.g., vm.v and vm.hm) to narrow down selections.
  • Use wildcards for naming filters, e.g., vm.n "Label*" to focus on visual labels.
  • Replace manual toggling with attribute-based filtering—especially useful for repetitive workflows.

These visibility controls not only save time but also help ensure reproducibility and consistency in how visual data is represented. Understanding and leveraging this layer of SAMSON’s NSL can streamline complex analysis and presentation tasks.

To dive deeper into how visual model attributes work, visit the original documentation page: https://documentation.samson-connect.net/users/latest/nsl/visualModel/.

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

Comments are closed.