Quickly Show or Hide Parts of Your Molecular Models in SAMSON

When working on complex molecular systems, visual clarity matters. Whether you’re preparing a figure, analyzing a molecular interaction, or just trying to focus on a specific component of your system, being able to control what is visible on screen is crucial. In SAMSON, the integrative molecular design platform, the Node Specification Language (NSL) empowers users to do this precisely through visibility attributes.

This post introduces how to use visibility-related attributes in the presentation attribute space — abbreviated as pr — to rapidly filter and manage what you see in your workspace. These simple tools help users streamline their experience and focus on what matters.

Visibility: Definitions that Matter

In NSL, the pr (presentation) attribute space filters presentation nodes, which control how things appear in the viewport (as opposed to structural or semantic nodes).

Here are the main attributes related to visibility:

  • pr.vvisible: Whether the node is effectively visible. Example: not pr.v to find hidden elements.
  • pr.vfvisibilityFlag: Whether the node should be shown. Example: pr.vf false to filter out items you chose to hide manually.
  • pr.hhidden: Similar result to not pr.v, but from the parent node space. Use pr.h to focus on hidden objects quickly.

While the differences between pr.v and pr.vf might seem subtle, they can be powerful when used together. For instance, pr.vf false and pr.v helps identify nodes that are normally visible but were hidden by user action — a common source of confusion when working with large or imported models.

Example Use Cases

Here are a few practical filters you might find useful in real-world workflows:

  • not pr.v: List all elements that are currently not visible (regardless of why).
  • pr.vf false: List elements explicitly hidden by the user.
  • pr.v: Focus on everything currently visible in the viewport.

These filters can be quickly typed into the NSL search bar in SAMSON’s interface to instantly filter nodes in your document view or select elements for further operation.

Why It Matters

Scientists and modelers often deal with hundreds — even thousands — of molecular components. Highlighting a ligand for a publication image, hiding solvent molecules to inspect a binding site, or analyzing only visible parts of a multimeric structure becomes much easier with NSL filters. Instead of manually selecting and toggling visibility, you can write a short, readable expression that gets you there in seconds.

Being able to script these filters also opens the door to automation. For example, combine pr.v filters with Python scripts to export only selected visible fragments for figure generation or further analysis.

To explore all the available options and learn more about the presentation attribute space in SAMSON, visit the official documentation page: https://documentation.samson-connect.net/users/latest/nsl/presentation/.

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

Comments are closed.