Working Smarter with Visual Model Visibility Flags in SAMSON

If you’ve ever opened a molecular model in SAMSON and found yourself overwhelmed by a cluttered workspace, you’re not alone. When dealing with complex assemblies, visual noise can slow down your analysis and make focusing on specific components more difficult. Fortunately, there’s a clean solution: visibility control using attributes in the Node Specification Language (NSL).

This post covers how molecular modelers can efficiently manage model visibility using the visibilityFlag and visible attributes in the visualModel attribute space. These attributes help you keep only what matters in sight, improving clarity and performance during model manipulation and rendering.

Why visibility control matters

Working with large biomolecular assemblies or multiscale systems can become visually crowded very quickly. Fine-grained control over which nodes are rendered or hidden not only makes scenes more manageable, but also helps highlight functional components without deleting anything or losing structural context. This is increasingly important during presentations, analysis workflows, or publication figure export.

Understanding vm.vf and vm.v

The visibilityFlag (vm.vf) and visible (vm.v) attributes are closely related. Learning when and how to use them will make your modeling sessions much more efficient.

  • vm.vf: This flag indicates whether a visual model is intended to be visible at the rendering level. Changing it effectively “turns off” the visibility intent for a node. Setting it to false disables its visibility.
  • vm.v: This attribute reflects the actual visibility of the visual model, factoring in additional scene conditions. You can query it to check if a model is currently visible.

Practical usage examples

To quickly hide a specific group of visual models in your view, try:

This command targets all visual models and sets their visibility flag to false — they’ll disappear from your scene but remain in the data structure.

To narrow that down to models with a specific naming convention:

You can also check which models are still visible:

And to hide them:

Combining with selection

It becomes even more powerful when combined with selection flags. For example, you might want to hide everything except what is currently selected:

When performance matters

Turning off visibility for less relevant parts of a structure can improve performance, especially for larger models. It also makes exporting figures cleaner, avoiding post-processing in external tools. This is a lightweight alternative to removing nodes or creating entirely new documents.

Conclusion

Using vm.vf and vm.v attributes in SAMSON’s Node Specification Language gives you refined control over what’s visible and when. By learning this simple syntax, you can keep your workspace clean and focused, and spend more time on science rather than searching through a cluttered view.

To learn more, visit the official NSL visual model documentation page.

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

Comments are closed.