Managing Visibility in Molecular Models: A Quick Guide Using NSL

When you’re working on complex molecular systems, there’s often a point where your visualization gets cluttered. Maybe you’re trying to focus on specific interactions while eliminating distracting nodes. Or perhaps you’re preparing a figure for a publication and need only a subset of nodes shown. For SAMSON users, controlling the visibility of specific components in the molecular design process is both crucial and simple—if you know where to look.

This post is all about managing visibility of property model nodes using the Node Specification Language (NSL) in SAMSON. We’ll walk through the visible and visibilityFlag attributes in the propertyModel attribute space (short name: pm) to show how you can customize your workspace for clarity and focus.

Why Visibility Matters

Whether you’re calculating electrostatic potentials, adding surface properties, or overlaying structural information, property models can pile up quickly. Instead of hiding or deleting them manually, the NSL provides a clean, reproducible way to control what’s visible based on defined attributes.

Two Visibility Tools at Your Service

In the pm (property model) space, you can use two attributes to control what is shown:

  • visible (v): Indicates if the node is currently visible.
  • visibilityFlag (vf): A manual setting that influences visibility behavior but is independent of other visibility logic.

Here’s the difference: pm.v checks whether something is actually visible, while pm.vf lets you set a flag to control visibility that can be picked up by other nodes or systems.

Using NSL Expressions

You can use NSL queries in Search and Filter tools in SAMSON to immediately hide or show the nodes you need. For example:

Imagine you’ve applied several electrostatic potential models and want to hide them. You could tag them with a naming convention and then use:

to quickly find and modify them. Use right-click → visibility toggle or script actions afterward.

Tips for Smooth Navigation

  • Apply meaningful naming conventions so selections with pm.n become easier.
  • Use visibilityFlag as a more stable reference for scripting automation processes.
  • Refresh or reselect nodes after applying filters to ensure visibility changes are updated in the viewport.

While these attributes are inherited from general node visibility settings, they become especially powerful when used specifically on propertyModel nodes—for example, in simulations or when handling volumetric or annotation data.

To learn more about how to filter and interact with property model attributes in the Node Specification Language, visit the official documentation page:
https://documentation.samson-connect.net/users/latest/nsl/propertyModel/

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

Comments are closed.