Quickly Find What’s Visible in Your Molecular Property Models

When working on complex systems in SAMSON, it’s easy for molecular modelers to lose track of which parts of the model are actually displayed. This can make editing or analyzing your structures frustrating — especially when you’re trying to isolate property models or materials meant to be visible, only to discover parts are unintentionally hidden or selected.

Fortunately, the Node Specification Language (NSL) in SAMSON offers a powerful yet lightweight set of attributes to help you work more efficiently. This post explains how to filter nodes based on visibility and selection flags within the propertyModel attributes space (pm). Understanding how visibility works can make a real difference in your modeling workflow.

Understanding the Visibility Attributes

In SAMSON, the propertyModel attribute space gives you control over attributes of property model nodes, allowing you to query what’s visible and what’s not. Here’s a quick breakdown of the key visibility-related attributes:

  • pm.v (visible): Returns nodes that are currently visible.
  • pm.vf (visibilityFlag): Flags set to control whether visibility is explicitly assigned.
  • pm.h (hidden): Returns nodes that are hidden.

These can be combined with logical operators to focus your selection exactly as needed. For example:

Selects all visible property model nodes.

Selects all non-visible property model nodes – this can be especially useful for debugging visibility issues.

Interestingly, you can also target nodes with specific visibility flags, which is helpful when managing complex models where custom visibility rules may apply:

Selects nodes with the visibility flag enabled, giving you insights into which parts are controlled explicitly.

Why This Matters

If you’ve ever exported a scene expecting certain property models to show up — but they don’t — using pm.v helps you verify what is actually going to appear. Similarly, combining visibility and selection flags together can help identify hidden but selected nodes, helping you correct the configuration before rendering or scripting operations.

This query highlights nodes that are selected but not visible — a common source of confusion during model manipulations or visual inspections.

In Practice

Let’s say you’ve created several property model nodes to segment your simulation results visually. Over time, as you build up additional materials or simulation attributes, it becomes increasingly important to be able to filter out what’s visible, what’s been forgotten, or what was hidden for a test and left that way. These simple queries eliminate the guesswork.

No need to dig through layer trees or toggle visibility manually. NSL provides exact control to inspect and organize your project better.

To dive deeper into all the available property model attributes, including materials and selection flags, visit the original documentation page.

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

Comments are closed.