Molecular modelers often encounter challenges when managing the visual properties of structures in their designs. Have you ever needed to filter or organize light nodes in your molecular model, but struggled with inflexible tools to accomplish specific tasks? If so, SAMSON’s Node Specification Language (NSL) and its light attribute space can simplify your workflow and empower you to work more efficiently.
In this blog post, we’ll explore how light attributes in SAMSON help you customize, query, and manipulate light nodes with ease. Whether for presentation, analysis, or documentation purposes, understanding these attributes will streamline your molecular modeling.
What Are Light Attributes?
The light attribute space, also called li for short, is designed specifically for working with light nodes in molecular models. Through SAMSON’s NSL, you can use light attributes to filter, select, or modify properties of light elements (such as their visibility, name, or selection status).
For example, do you want to hide specific light nodes temporarily or target only the visible ones? You can do this with ease using light attributes. Let’s break down some of the most important light attributes:
Key Attributes of the light Space
| Attribute Name | Short Name | Description | Examples |
|---|---|---|---|
hidden |
h |
Indicates whether a light node is hidden (true or false). |
Examples: li.h, not li.h |
name |
n |
Queries light nodes by matching their assigned names (strings in quotes). | Examples: li.n "A", li.n "L*" |
visible |
v |
Specifies whether a light node is visible (true or false). |
Examples: li.v, not li.v |
selected |
Indicates if the light node is selected in your molecular model. | Examples: li.selected, not li.selected |
Example Use Cases
- Filter for hidden nodes: Want to work on only the hidden light nodes? Use
li.h. - Find nodes by name: To locate all light nodes with a specific naming pattern, try
li.n "L*". The wildcard allows for matching multiple results. - Toggle visibility of lights: To show only the visible nodes, query
li.v. - Selection-based actions: If you need to focus on selected light nodes, you can use
li.selected. Combine this with other attributes for more fine-tuned workflows!
Build Smarter Filters with Combined Queries
The true power of light attributes lies in combining them. For example, suppose a specific light node you’re working on is visible and has a name starting with “A.” You can query this as follows:
|
1 |
li.v and li.n "A*" |
This makes it easy to locate nodes that meet complex criteria, saving both time and effort in your molecular modeling tasks.
Where Can You Learn More?
The light attribute space is a versatile tool for both beginners and advanced users of SAMSON. To dive deeper into examples, check out the full documentation on light attributes.
SAMSON and all SAMSON Extensions are free for non-commercial use. Download SAMSON today at https://www.samson-connect.net.
