Why You Can’t See Your Atoms: Understanding Hidden and Visible Nodes in SAMSON

If you’ve ever loaded a complex molecular model into SAMSON and thought, “Where’s the rest of my structure?”, you’re not alone. Molecular modelers often run into visibility issues when working with advanced datasets. The problem can be frustrating, especially when atoms or full chains seemingly disappear—or never show up in the first place. But in SAMSON, these cases often have a logical explanation, rooted in node attributes like hidden, visible, and visibilityFlag.

This post will walk you through how the Node Specification Language (NSL) in SAMSON handles visibility-related attributes, helping you take full control over what you see—whether you’re working on ligand-bound complexes, surface representations, or massive biomolecular systems. 🧬

Why ‘Visible’ Doesn’t Always Mean ‘Showing’

SAMSON uses a graph-based representation for molecular models. Each node (representing atoms, residues, molecules, visual models, etc.) has its own attributes. Visibility is determined not just by whether a node is ‘visible’ itself, but also by whether any of its ancestors are hidden. So even if, for example, an individual atom is marked as visible, it may remain hidden from the UI if the molecule or group containing it is hidden.

Essential Attributes

  • node.visible (short name: n.v): A node is visible if its visibilityFlag is true and all of its ancestors are also visible.
  • node.visibilityFlag (short name: n.vf): This directly controls whether a particular node should be visible. Changing this flag doesn’t consider the state of ancestors.
  • node.hidden (short name: n.h): This is the logical inverse: it returns true for nodes that are hidden due to their visibilityFlag or the visibility status of their ancestors.

Common Use Cases

Let’s look at two common scenarios:

  • Making atoms visible: If you’ve applied a filter and atoms aren’t displaying, you can use the query n.v to inspect what parts of your model are truly visible.
    For example: n.t a and n.v selects all atoms that are currently visible.
  • Finding hidden chains: To identify parts of your model that may be hidden (despite not being deliberately turned off), use n.h. This is particularly useful when working with templates or imported models where some parts are collapsed by default.

Troubleshooting Tips

  • Use not n.h to select everything currently unhidden.
  • If visibility is inconsistent, check parent nodes (residue, chain, model) to ensure their visibility flags are active.
  • Apply n.vf true to force the visibility flag on specific nodes regardless of ancestry.

Why This Matters

Understanding visibility attributes isn’t just about ‘making atoms show up.’ It’s about performance and presentation. Managing what’s rendered on screen can dramatically improve real-time interaction, reduce rendering load, and enhance communication in presentations or tutorials.

NSL gives you fine-grained control—whether you’re working on protein-ligand docking or building complex visual pipelines.

To learn more details and go further into node attributes in NSL, visit the full documentation page 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.