Understanding and Using the ‘hidden’ Attribute in SAMSON’s Node Specification Language

When working with complex molecular models, managing how different nodes are displayed can improve clarity and workflow efficiency. This is where the hidden attribute from SAMSON’s Node Specification Language (NSL) can be highly beneficial. In this blog post, we will explore what the hidden attribute is and how to effectively use it for your molecular modeling projects.

What is the ‘hidden’ Attribute?

The hidden attribute is part of the presentation attribute space in NSL. It is specifically designed for controlling the display of presentation nodes within SAMSON. This attribute determines whether a given node should be hidden from view, helping to declutter complex molecular models while still keeping all nodes accessible in the backend.

For instance, imagine you are working on a large biomolecule with hundreds of components. Visualizing all these components simultaneously might make it difficult to focus on specific areas of interest. The hidden attribute allows you to hide irrelevant nodes temporarily, enabling you to streamline your visual workspace without deleting or altering the underlying data.

How to Use the ‘hidden’ Attribute

To customize node visibility in SAMSON using the hidden attribute, you can leverage its simple syntax. The attribute accepts two Boolean values: true and false, controlling whether a node is hidden or not.

Here are the essentials of the hidden attribute syntax:

  • To check if a node is hidden: pr.h
  • To explicitly hide a node: pr.h true
  • To ensure a node is visible: pr.h false
  • To find all visible nodes: not pr.h

The power of NSL lies in its flexibility. You can even combine these conditions to create more complex queries tailored to your current modeling needs.

Inherited Simplicity

It’s important to note that the hidden attribute is inherited from the broader node.hidden attribute space. Thanks to this inheritance, users familiar with manipulating node attributes will find working with pr.h both intuitive and consistent across SAMSON’s functionality.

Practical Example

Let’s say you’re analyzing a protein-ligand system and want to focus only on the ligand while toggling the visibility of specific atom groups. A practical NSL expression might be:

This expression hides all nodes within the presentation space, decluttering your visualization. To restore the visibility of all these nodes, simply use:

Through the consistent use of the hidden attribute, you can efficiently toggle complex views for detailed analysis while maintaining control of your workspace setup.

Final Thoughts

Mastering the hidden attribute enables molecular modelers to declutter visualizations, focus on areas of interest, and enhance productivity. This simple yet powerful tool reinforces SAMSON’s versatility as an integrative molecular design platform.

For more insights into NSL and its presentation attribute space, visit the official SAMSON 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.