How to Instantly Filter Hidden Visual Models Without Coding

When you’re working with large, complex molecular systems in SAMSON, staying organized can be a challenge. Visibility settings help, but after several modeling or analysis steps, it’s easy to lose track of what you’re actually seeing. Hidden visual models can accumulate silently, cluttering memory usage or simply causing confusion.

If you’ve ever asked yourself, “Why is this not showing up?” or “Which parts of my model are actually hidden?”, this post might save you some time.

Filter Hidden Visual Models Using NSL

SAMSON’s Node Specification Language (NSL) provides a flexible way to query components of your molecular scene. When it comes to identifying hidden elements, it offers a clear and reliable method—without scripting or manual digging.

The attribute that comes to your rescue here is hidden from the visualModel attribute space, also accessible using the short name vm.h. It determines whether a visual model node is currently set to hidden.

Example: Find Hidden Visual Models

This simple query will match all visual model nodes in your scene that are currently hidden. You could then choose to unhide, analyze, or delete these nodes, depending on your workflow priorities.

Example: Find Only Visible Visual Models

This is the reverse: it lists all visual models that are not hidden. Useful when you want to check what’s actually shown in your viewport so you don’t miss important parts of your model.

How Is This Different From ‘Visible’?

If you’re wondering whether this is the same as the visible attribute (vm.v), the answer is: not quite. NSL distinguishes between the visible and hidden attributes to give you more granular control.

  • visible: Indicates whether the node is effectively visible in the scene, factoring in global visibility conditions.
  • hidden: Refers to whether the specific node is marked as hidden, independent of context.

In other words, a visual model may be not visible for various reasons, including parent or group visibility settings. If you only want to track nodes you have explicitly hidden using the interface or scripting tools, use vm.h.

Combine Filters for Precision

You can also combine this attribute with others. For example:

…would return all hidden visual models whose names begin with “Ligand”.

Why This Helps

Molecular modelers often work with many types of data over time—density maps, structural models, surfaces, analysis results. Having snapshots of what’s hidden helps you clean up redundant data, spot visualization errors early, and optimize performance for rendering and exporting scenes.

This approach works well for both large biomolecular assemblies and smaller targeted systems. It brings peace of mind when you revisit old projects or share them with collaborators.

To explore more NSL attributes for visual model nodes and learn how to refine your queries, see the full documentation page here.

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

Comments are closed.