Making Sense of Molecular Visibility in SAMSON: A Simple Guide to Presentation Flags

When working with complex molecular systems in SAMSON, the molecular modeling platform, one common challenge is maintaining clarity in your scene. In large systems, certain parts often need to be hidden, grayed out, or emphasized for better understanding, analysis, or presentation. If you’ve ever felt overwhelmed by too many visible elements in your working environment, understanding SAMSON’s visibility settings using the Node Specification Language (NSL) can help declutter your view and improve your workflow.

What are Presentation Attributes?

In NSL, presentation attributes are used to query and filter presentation nodes—elements that control how molecules are displayed. They are part of the presentation (or pr) attribute space, and offer parameters like hidden, visible, selectionFlag, and more. These can be combined into powerful queries that control what is shown or hidden in your molecular view.

Visibility Tools at Your Fingertips

Here are the key visibility-related attributes:

  • pr.v (visible): Set or match whether a node is visible (true) or not. For example, pr.v matches all visible presentation nodes.
  • pr.vf (visibilityFlag): Also indicates visibility, but directly tied to flags within the system. Useful when combining with other flags, like selection.
  • pr.h (hidden): The inverse of visible. Use pr.h to find all hidden nodes, or not pr.h to find all shown nodes.

Example Use Cases

1. Want to hide everything except ligands?
Use NSL expressions to match only ligand nodes (for example based on their name pattern) and then set others to pr.v false or pr.h true.

2. Need to export images with only selected regions?
Filter with pr.selected and apply visibility toggle only to these nodes.

Inherited but Useful

Attributes like pr.visible and pr.hidden are inherited from the general node attribute space, which means they behave consistently across other node types too. This consistency simplifies visibility control, especially when working with selections and scripting.

Going Further With Scripts

When paired with Python scripting in SAMSON, these attributes become incredibly powerful. Imagine writing scripts that make atoms gradually appear, or automatically hide solvent when zooming in on a protein-ligand interface. Understanding which presentation attributes control visibility is the first step toward these more advanced applications.

Conclusion

Controlling visibility using presentation attributes in NSL can streamline your modeling tasks and make presentations clearer. These small but impactful tweaks help you focus on what matters most in your scene. To learn more and explore the full list of presentation attributes, visit the detailed documentation page:

https://documentation.samson-connect.net/users/latest/nsl/presentation/

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

Comments are closed.