Why Is My Node Missing? Demystifying Visibility in SAMSON

If you’ve ever asked yourself, “Where did my node go?” while working in SAMSON, you’re not alone. Molecular modelers, especially those building complex systems with numerous nested components, often run into confusion when parts of their structure appear to be missing — even when they’re still in the document. This blog post will help you understand the difference between visible, hidden, and visibilityFlag attributes in SAMSON’s Node Specification Language (NSL), and how they affect what is shown in your workspace.

The Problem: Vanishing Nodes

You import a structure or build a model, and everything looks fine — until it doesn’t. Some atoms or entire groups seem to disappear, and you’re not sure if they were deleted, filtered out, or simply hidden. This is frustrating, especially in visually intensive modeling tasks like ligand-binding simulations, where visual context matters.

Understanding Visibility: Three Related Attributes

SAMSON provides powerful control over node visibility through three attributes:

  • node.visibilityFlag (short name: n.vf): Indicates whether the node itself is flagged to be shown or hidden.
  • node.hidden (short name: n.h): Indicates whether a node is effectively hidden. This could be because its own visibilityFlag is false or because that of one of its ancestors is false.
  • node.visible (short name: n.v): Indicates whether the node is visible, determined by the combination of visibilityFlag values along its hierarchy.

Hidden Node Diagram

By querying or modifying these attributes, you can quickly locate and manage elusive nodes in large or cluttered molecular systems.

Common Scenarios and How to Solve Them

“I can’t see my polymer segment!” It may not be deleted — it might just be hidden.

  • To find all hidden nodes: n.h
  • To find only the ones explicitly flagged as not visible: not n.vf
  • To find nodes that should be visible but are not shown due to a hidden ancestor: compare n.vf and n.v

Need to select everything currently visible? Use this query:

This is especially useful when preparing figures or exporting visible structures for simulations. Similarly, if you imported a file and not everything is showing up, using not n.v can be very helpful to audit what’s hidden.

Pro Tip: Bulk Show/Hide

Once you’ve selected hidden or visible nodes via NSL, you can quickly change their visibilityFlag to toggle visibility. Just remember that n.vf sets local visibility, but a node will only truly appear if its whole ancestry is visible.

Better Visibility = Better Modeling

Understanding how SAMSON manages node visibility helps avoid confusion and streamline your workflow. Whether you’re troubleshooting why a ligand disappears or managing large assemblies piece by piece, these three attributes can save you time and frustration.

To learn more about node attributes in NSL, check out the full documentation here.

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

Comments are closed.