For molecular modelers working on creating, analyzing, or manipulating computational models, efficient workflows are critical. One of the challenges you might face is ensuring that distinct components of your molecular models—like light nodes—are controllable using clear specifications. That’s where SAMSON’s Node Specification Language (NSL) comes in, offering tremendous flexibility for targeting specific attributes of nodes. This guide dives into the light attributes in the NSL, simplifying the way you can manage light nodes to streamline your work.
What Are Light Attributes in SAMSON?
Light attributes are a group of attributes in the light attribute space (short name: li) of SAMSON’s Node Specification Language. They are specifically designed to target and manipulate light nodes in molecular models, which are essential for tasks like defining lighting effects in a scene or refining visual conditions for analysis.
Like other nodes in SAMSON’s NSL, light nodes come with their own attribute space. However, they inherit selected attributes from the general node attribute space but are adapted for the light-specific use cases. These attributes include options for toggling visibility, setting names, and more.
Key Attributes to Know
Here’s a breakdown of some important inherited light attributes and how they can be utilized effectively:
| Attribute | Short Name | Expected Values | Sample Usage |
|---|---|---|---|
| hidden | h |
true, false |
li.h, not li.h |
| name | n |
String (in quotes) | li.n "A", li.n "L*" |
| selected | – | true, false |
li.selected, not li.selected |
| selectionFlag | sf |
true, false |
li.sf, li.sf false |
| visibilityFlag | vf |
true, false |
li.vf, li.vf false |
| visible | v |
true, false |
li.v, not li.v |
Attribute Applications in Molecular Modeling
- Hidden (
hidden): Use this attribute to manage whether light nodes should actively modify the visualization or remain silent contributors in the background. - Visibility (
visibleandvisibilityFlag): These attributes simplify toggling scene light exposure, making it effortless to adjust what is visible to the viewer or hidden during scene adjustments. - Name (
name): By using descriptive names or filtering light components with wildcard matching (e.g.,li.n "L*"), you can dynamically affect multiple related lights simultaneously, speeding up your workflow.
Practical Tips for NSL Users
1. If you’re trying to apply specific changes to lights in bulk, use short names like li.h for compact queries, helping you write streamlined expressions.
2. Combine attributes like li.n (by name) with li.v (visibility) to easily target subsets of lights based on context-sensitive needs without sifting through extensive node trees.
Learn More
Understanding light attributes is an essential part of maximizing SAMSON’s Node Specification Language. For detailed attribute definitions and additional examples, visit the full documentation page at https://documentation.samson-connect.net/users/latest/nsl/light/.
SAMSON and all SAMSON Extensions are free for non-commercial use. Get started by downloading SAMSON at https://www.samson-connect.net.
