When working on complex molecular systems, visual clarity is key. Whether you are preparing figures for publication, designing custom visualizations for a client, or simply trying to study part of a simulation in better detail, controlling what is visible—and what is not—can make a huge difference.
In the SAMSON molecular design platform, the way label nodes are displayed is controlled via a set of attributes. These attributes determine whether a label is shown or hidden, whether it’s currently selected, and more. Understanding and using these features smartly can save time and reduce visual clutter, especially in large systems.
What are label nodes?
Label nodes are annotations that users can attach to molecular systems in SAMSON. They can represent anything from text comments to custom identifiers or tags. By default, all labels are visible. However, as projects grow and accumulate annotations, the visual space can quickly become overcrowded.
Visibility attributes for labels
SAMSON provides three main attributes to control label visibility:
la.v(visible)la.vf(visibilityFlag)la.h(hidden)
All these are part of the “la” attribute space, which specifically targets label nodes. Here’s how each one works and why you might want to use them:
1. la.v: Is the label visible right now?
This attribute answers the most basic question: is this label currently being shown in the viewport? Applicable values are true and false. To hide all currently visible labels, simply use not la.v in a filter or operation.
2. la.vf: Should this label be visible?
This attribute reflects the user’s intent. Even if la.vf is true, SAMSON might hide the label due to global filters or visibility toggles. Think of it as a request rather than a guarantee.
3. la.h: Is the label explicitly hidden?
An inherited attribute from nodes in general, la.h is a direct toggle for whether the label is hidden altogether. This can override some other viewing preferences.
Common usage scenarios
Here are a few examples of how molecular modelers benefit from understanding these attributes:
- Preparing Presentations: Temporarily turn off all labels without deleting them by setting
la.v false. - Custom Filtering: Select only visible labels with
la.vor only those meant to be visible withla.vf. - Debugging Display Issues: Unsure why a label isn’t showing? Check both
la.vandla.vfto figure out if it’s a setting or a system visibility rule.
Example: Cleaning up the view
Let’s say you’re working on a protein-ligand complex and have a dozen labels identifying functional sites. For a final render, you want to only keep those with names starting with “L”. Use:
|
1 |
la.n "L*" and la.v |
This returns all labels whose name starts with “L” and are currently visible.
Tip: You can combine multiple NSL expressions to define precise display rules. For example:
|
1 |
(la.n "L*" or la.n "A*") and not la.h |
This shows labels beginning with “L” or “A” that are not hidden.
Understanding how to manipulate these label attributes is a simple yet powerful way to get cleaner, more focused visualizations without deleting useful annotations.
To learn more about available label attributes, visit the official SAMSON Label Attributes Documentation.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
