When working with molecular modeling, especially in platforms like SAMSON, navigating the visual organization and representation of nodes is often a critical, yet intricate, task. This is where the Light Attributes within SAMSON’s Node Specification Language (NSL) can become your best ally.
The concept of Light Attributes is tied to the light attribute space, abbreviated as li, which is specifically designed for interacting with light nodes. If you’ve ever wondered how to efficiently control attributes such as visibility, name filters, or selection state—all while handling large molecular scenes—this guide focuses on bringing clarity to these useful tools.
Understanding the Light Attribute Space
The light attribute space concentrates on properties that are relevant to light nodes. It borrows a few attributes from the broader node attribute space while adapting them to its own context.
Here are some of the key attributes you can work with in the light attribute space:
| Attribute Name | Short Name | Possible Values | Examples |
|---|---|---|---|
| hidden | h |
true, false |
li.h, not li.h |
| name | n |
Strings in quotes | li.n "A", li.n "L*" |
| selected | true, false |
li.selected, not li.selected |
|
| selectionFlag | sf |
true, false |
li.sf false, li.sf |
| visibilityFlag | vf |
true, false |
li.vf false, li.vf |
| visible | v |
true, false |
li.v, not li.v |
Practical Applications
Filter by Name: For example, you can use li.n "L*" to find light nodes whose names start with the letter “L”. This can save significant time when isolating specific nodes within complex systems.
Control Visibility: By toggling visibility flags (li.vf) or directly querying visibility (li.v, not li.v), you can adjust which parts of your scene are displayed. This is especially useful when dealing with multilayer molecular scenes.
Selectively Work with Nodes: Use the selected and selectionFlag attributes to refine which nodes are currently active for your tasks. For instance, li.sf false provides an easy way to programmatically exclude flagged nodes from specific operations.
Conclusion
Light attributes in SAMSON’s NSL enable greater precision and flexibility when dealing with light nodes in large, visually complex molecular models. Familiarizing yourself with these attributes provides powerful tools to streamline your workflows, improve clarity, and save time.
To delve deeper into how these attributes work, visit the original documentation page.
SAMSON and all SAMSON Extensions are free for non-commercial use. Download SAMSON at https://www.samson-connect.net.
