Quickly Tidy Up Molecular Backbones Using Visibility Attributes

When working with complex molecular systems, clarity is key. A cluttered visual representation can slow down modeling and analysis. Fortunately, in SAMSON, you can streamline your workspace using the visible and hidden attributes within the backbone attribute space of the Node Specification Language (NSL).

Why control visibility?

If you’re analyzing specific regions of a large molecule or focusing on a subset of a structure, hiding irrelevant or distracting elements can save you both clicks and mental effort. Instead of relying solely on manual selection and view toggling, you can apply targeted filters using NSL expressions based on visibility properties.

The basics

The backbone attribute space (short name: s) provides access to various properties. Among them, visible, hidden, and visibilityFlag allow you to programmatically define what is shown or hidden in your molecular model.

Attribute Short Name Values Examples
visible v true, false bb.v
not bb.v
hidden h true, false bb.h
not bb.h
visibilityFlag vf true, false bb.vf
bb.vf false

Use cases

Here are some quick examples of how you might use these attributes to filter your view:

  • Show only visible backbones: bb.v
  • Hide all visible backbones: not bb.v
  • Select only hidden nodes: bb.h
  • Work with backbones with visibility flags disabled: bb.vf false

These expressions can be used within NSL search queries to select, isolate, or apply properties to specific node subsets based on visibility.

Common scenarios solved

If you’ve ever:

  • Struggled to declutter a view after loading a large structure
  • Wanted to apply materials or colors only to visible parts
  • Needed to export a visual representation without background noise

…then visibility attributes can help eliminate these common annoyances fast.

Pro tip

Combine visibility attributes with other filters for powerful queries. For example:

This selects all visible backbones that have more than 5 carbon atoms – useful if you want to focus on certain substructures based on chemical composition.

To learn more about the attributes available for backbones in NSL, visit the original documentation page.

SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON here.

Comments are closed.