Why Some Nodes Disappear in Your Molecular Model (and How to Find Them Again)

Have you ever opened a molecular model in SAMSON and found that part of your structure seems to be mysteriously missing? Nothing is more frustrating than knowing the data is there—but the atoms, residues, or even entire molecules don’t show up in the viewer.

This is a common experience among molecular designers, especially when working with complex systems or shared documents. Fortunately, there’s a clear and systematic way to understand and fix this issue using the Node Specification Language (NSL) in SAMSON.

What’s Happening?

The reason most nodes appear to disappear is due to their visibility state. SAMSON nodes can have visibility controlled both at the node level and via inherited attributes from parent nodes. This means even if a node itself is marked as visible, it might still be hidden because a parent node is not.

To navigate and fix these issues properly, it’s important to understand the difference between three NSL node attributes:

  • node.visible (short: n.v)
  • node.visibilityFlag (short: n.vf)
  • node.hidden (short: n.h)

Getting Your Nodes Back with NSL

Here are some practical tips and NSL expressions to uncover and control node visibility.

1. Finding All Visible Nodes

If you’re troubleshooting and only want to work with what’s currently visible:

This matches all visible nodes. Use this to confirm what is actively displayed in your scene.

2. Finding All Hidden Nodes

Want to find out what’s currently hidden? Try:

This returns nodes that are not visible due to their own visibility flag or that of an ancestor.

3. Checking Visibility Flags Directly

To see which nodes are explicitly marked as visible, regardless of display inheritance:

…or explicitly hidden:

This is especially handy if certain elements seem hidden even though logic says they shouldn’t be. A parent’s visibility flag might be affecting them.

Exploring with Examples

Let’s say you want to reveal all atoms in your current model that are hidden due to a visibility setting:

Now you can isolate only the atoms that aren’t currently showing up and selectively make them visible again if necessary.

Likewise, to find visual model nodes (like ball-and-stick models) that are currently visible:

When Visibility is Inherited

One key thing to remember is that n.v (visible) depends on both a node’s visibilityFlag and the visibility of its ancestors. If a structural group is hidden, none of its atoms will appear—even if their own visibility flags are set to true.

To fully diagnose a problem, it’s good practice to explore both the n.vf and n.h/n.v attributes in tandem.

Final Tip: Unhiding Everything

Want to make everything in your model visible again quickly? You can use NSL to search for all hidden nodes and manually toggle their visibility, or use SAMSON’s UI to reset visibility flags on parent structures. Being aware of these NSL filters will make you much more efficient in managing model visibility.

To learn more, visit the official NSL documentation.

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

Comments are closed.