For molecular modelers, rendering the visual representation of light sources is often crucial to achieve accurate analysis and compelling presentations. If you’ve been wondering how you can specify and manipulate light nodes efficiently, SAMSON’s Node Specification Language (NSL) provides a powerful set of tools through light attributes. In this post, we’ll take a closer look at light attributes and how they can simplify and enhance your workflow.
What Are Light Attributes?
Light attributes exist in the light attribute space (short name: li), which is designed to match only light nodes. These attributes allow you to control the visibility, naming, and selection of light elements in your molecular projects. They inherit functionality from the broader node attribute space, but are specifically optimized for light.
Core Light Attributes
Let’s explore some of the central light attributes and how they can be used effectively:
- hidden (h): Use this to determine whether a light node is hidden. Possible values are
trueorfalse. For instance, you could match hidden light nodes withli.h, or non-hidden light nodes withnot li.h. - name (n): This attribute lets you reference light nodes by name. Use strings in quotes to match the exact name or patterns. For example, you can select a light node named “A” with
li.n "A"or match names that begin with “L” by usingli.n "L*". - selected: Whether a light node is selected or not can be controlled with this attribute. Use
li.selectedfor selected lights andnot li.selectedfor unselected ones. Note that it doesn’t have a short name. - selectionFlag (sf): This attribute provides additional selection control. Example: You can use
li.sf falseto identify light nodes with the selection flag set tofalse. - visibilityFlag (vf): Similar to
hidden, but specifically controls a visibility flag. Example:li.vfto locate visible light nodes. - visible (v): Quickly access visible nodes with
li.v, or retrieve non-visible ones withnot li.v.
How Light Attributes Address Modeling Challenges
Light attributes give you precise control over how light nodes are integrated into your molecular modeling. For example, they allow you to:
- Hide or toggle visibility of light nodes to declutter the modeling environment.
- Quickly find and modify specific light nodes by name.
- Streamline workflow for selecting or deselecting light elements with the
selectionFlag.
Leveraging these attributes means you spend less time navigating complex models and more time focusing on your research and design goals.
Learn More
The light attributes documentation page offers detailed explanations and examples for mastering these techniques. Visit it here: Light Attributes Documentation.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON here.
