Simplify Molecular Labeling with ‘Label’ Attributes in SAMSON

Molecular modeling often requires precise control when managing labels. For instance, when working with complex molecular structures, researchers might need to highlight or hide certain labels, filter specific labels by name, or define visibility and selection attributes. This is where the ‘label’ attribute space in SAMSON’s Node Specification Language (NSL) proves invaluable.

The ‘label’ attribute space (short name: la) is tailored for label nodes and helps molecular modelers efficiently organize and visualize their labels. Below, we dive into the key attributes and their practical applications.

Overview of ‘Label’ Attributes

The ‘label’ attribute space includes six core attributes:

  • hidden (short name: h): Indicates whether a label is hidden. Possible values are true or false. For example:
    • la.h returns labels that are hidden.
    • not la.h returns labels that are visible.
  • name (short name: n): Filters labels by their name. String comparisons are made using quotes. Examples include:
    • la.n "A": Returns labels with the exact name “A”.
    • la.n "L*": Returns labels whose names start with “L”.
  • selected: Indicates whether a label is selected. Possible values are true or false. Example queries:
    • la.selected: Fetches all selected labels.
    • not la.selected: Fetches all unselected labels.
  • selectionFlag (short name: sf): Represents flags assigned to selection states. Queries include:
    • la.sf false: Finds labels where the selection flag is false.
    • la.sf: Finds labels where the selection flag is true.
  • visibilityFlag (short name: vf): Offers control over visibility flag states. Examples:
    • la.vf false: Filters labels where the visibility flag is disabled.
    • la.vf: Filters labels where the visibility flag is enabled.
  • visible (short name: v): A straightforward attribute to determine visibility. Possible uses include:
    • la.v: Returns labels that are currently visible.
    • not la.v: Returns labels that are not visible.

Inherited Versatility

The ‘label’ attributes are inherited from the node attribute space. This makes it easy for users familiar with general NSL attributes to adapt to working specifically with labels.

Whether you’re looking to streamline visibility, manage label selection, or isolate specific labels by name, these attributes empower you to precisely control and organize the labeling process in SAMSON.

A Practical Example: Highlight Explicit Labels

Imagine working in a detailed molecular system where you’ve annotated sections with specific labels. You only want to focus on labels starting with “L” that are visible and selected. Using ‘label’ attributes, this can be achieved with a simple query:

This query identifies all matching labels and highlights them, allowing you to focus on what matters most in your design workflow.

These tools not only improve your efficiency but also give you better clarity when working with intricate molecular designs.

To see the full list of attributes and explore additional use cases, visit the official documentation page.

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

Comments are closed.