Spotting Hidden Molecular Backbones with SAMSON’s NSL

When working with complex molecular systems, it’s common to end up with visual clutter. Backbones, structural groups, side chains, and other entities can overlap, coexist, and sometimes hide from view—literally. That’s when being able to find and filter out exactly what you want becomes essential. Luckily, SAMSON’s Node Specification Language (NSL) provides a structured solution for this.

One specific pain that many molecular modelers face is: How do I find hidden backbones? Whether you’re preparing presentation visuals, debugging missing data, or scripting modifications, identifying invisible parts of your molecular model needs to be fast and precise. Let’s look at how to do that using SAMSON’s NSL capabilities—especially the hidden and visible attributes.

Finding Hidden Backbones

In NSL, you can target backbones using the bb prefix. Want to list every hidden backbone? Just type:

This shorthand command tells SAMSON to match all backbones where the hidden attribute is true. If the project you’re working on has dozens—or even thousands—of structural elements scattered across multiple levels of the hierarchy, this can save hours of scrolling and manual selection.

Similarly, to filter all visible backbones:

Or even more explicitly:

The v stands for the visible flag. It’s just another way of confirming what’s currently on display in your scene.

Selecting vs. Visibility

It’s important not to confuse visibility with selection. Just because a backbone is visible doesn’t mean it’s selected. Similarly, something can be selected despite being hidden. You can combine conditions to filter very specific visual states. For instance:

This matches hidden backbones that are also selected—ideal in scenarios where selections persist through visibility toggles.

Want to find backbones that are not selected and currently hidden?

Practical Use Case

Imagine you’ve imported a PDB structure and applied visibility filters to declutter your view. Later, you can’t remember which parts you hid. Instead of searching piece by piece in the Document View, use:

This gives you all the hidden backbones, allowing you to selectively restore visibility.

If you’re building scripting workflows, these filters let you precisely control which nodes your scripts act on—avoiding invisible or irrelevant nodes.

To explore more options such as selectionFlag or ownsMaterial, check the full documentation. Filters like bb.om (for material ownership) can also be paired with visibility states to better control rendering or export behaviors.

For an in-depth look at available attributes and examples, visit the official NSL Backbone Attributes documentation.

SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON here.

Comments are closed.