Understanding Light Attributes in SAMSON’s Node Specification Language

Molecular modelers often face the challenge of managing various attributes and properties of nodes while designing and analyzing molecular systems. If you’re working with light nodes in SAMSON, the Node Specification Language (NSL) offers a structured way to interact with these entities. This blog post dives into the light attribute space, a key feature for tailoring your workflow and enhancing efficiency.

The light attribute space (li) is specifically designed for light nodes. It provides access to various attributes, including both their names and short names, alongside the values they accept and how they can be queried or modified. This targeted approach ensures users can efficiently manage light nodes in their molecular designs.

Key Light Attributes

The light attribute space includes powerful features that can streamline your efforts. Let’s explore some of the essential attributes:

  • Hidden (li.h): This attribute determines whether a light node is hidden. It accepts true or false. For example:
    • Query hidden nodes: li.h
    • Exclude hidden nodes: not li.h
  • Name (li.n): Use this attribute to filter nodes based on their names. The names are strings enclosed in quotes. For instance:
    • Specify a precise name: li.n "A"
    • Use wildcards: li.n "L*"
  • Selected (li.selected): Indicates if a node is selected. While it has no short name, its possible values are true and false.
    • Filter for selected nodes: li.selected
    • Exclude selected nodes: not li.selected
  • SelectionFlag (li.sf): This attribute is useful for identifying specific node selection conditions. For example:
    • Query nodes with a selection flag of false: li.sf false
  • VisibilityFlag (li.vf): Determines if a node has a visibility flag set. Similar to other attributes, it accepts boolean values:
    • Query nodes with the visibility flag enabled: li.vf
  • Visible (li.v): Indicates whether a light node is visible. Possible usage:
    • Find visible nodes: li.v
    • Filter out visible nodes: not li.v

Why Use These Attributes?

By employing the light attribute space, modelers can efficiently identify and manipulate specific nodes, tailoring molecular systems for their needs. For example, imagine quickly isolating visible light nodes while ignoring hidden ones, or filtering nodes based on their selection status. This level of control minimizes manual effort and ensures accuracy.

To get started, experiment with queries in the light attribute space, combining attributes like li.h and li.n for more complex conditions. For detailed examples and additional guidance, check out the original documentation page linked below.

Learn more about light attributes here.

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

Comments are closed.