Molecular modelers often grapple with organizing and customizing their modeling workflows to navigate complex hierarchical structures efficiently. When dealing with lighting nodes in molecular designs, SAMSON’s Node Specification Language (NSL) provides a set of tools to streamline this process. In this blog post, we focus on the light attribute space in NSL—how it works, and how you can leverage it to enhance your projects.
What are Light Attributes?
In SAMSON, light attributes belong to the light attribute space (short name: li). This attribute space applies specifically to light nodes within your molecular models, which are crucial for visualizing and understanding systems in 3D environments. Using these attributes, modelers can filter, modify visibility, and manage the selection of light nodes efficiently.
Key Light Attributes
Here’s an overview of the most commonly used light attributes and how they can be applied in NSL expressions:
- hidden (
h): This attribute determines whether a light node is hidden. Possible values aretrueorfalse. For example:li.h: Matches light nodes that are hidden.not li.h: Matches light nodes that are not hidden.
- name (
n): The name of the light node, expressed as a string. This is useful for identifying or grouping light nodes based on their naming convention. For instance:li.n "A": Matches light nodes with the exact name “A.”li.n "L*": Matches light nodes whose names start with “L.”
- selected: Light node selection status. While it doesn’t have a short name, this is a simple yet powerful attribute. For example:
li.selected: Matches light nodes that are selected.not li.selected: Matches all unselected light nodes.
- selectionFlag (
sf): A boolean indicating whether the selection flag is set. Examples include:li.sf false: Matches light nodes whoseselectionFlagis set tofalse.li.sf: Matches light nodes whoseselectionFlagis set totrue.
- visibilityFlag (
vf): Similar toselectionFlag, this boolean determines whether the visibility flag is enabled. Example expressions include:li.vf false: Matches light nodes with visibility flags set tofalse.li.vf: Matches light nodes with visibility flags set totrue.
- visible (
v): Indicates whether light nodes are visible. For instance:li.v: Matches visible light nodes.not li.v: Matches light nodes that are not visible.
How Can These Attributes Help Molecular Modelers?
Light attributes enable you to easily manage and control lighting nodes within complex molecular environments. For example, you can:
- Quickly isolate and analyze specific lighting configurations by naming conventions using
n. - Improve 3D scene clarity by toggling
hidden,visibilityFlag, andvisibleattributes dynamically during rendering. - Set up custom workflows by leveraging
selectionFlagandselectedattributes for automated processing of light nodes.
By combining these attributes with broader NSL functionalities, molecular modelers can fine-tune their designs for visualization and analysis with minimal effort.
Documentation Reference
Would you like to dive deeper into light attributes and explore more examples? Visit the original documentation page for Light Attributes in NSL.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at SAMSON Connect.
