For molecular modelers using SAMSON, understanding and controlling light node attributes in the Node Specification Language (NSL) can significantly improve your workflow efficiency. If you’ve been struggling with managing visibility or selection states for your molecular visualizations, this article breaks down the essential light attributes you need in your toolkit.
Light Attributes: A Quick Introduction
Light attributes belong to the light attribute space in NSL, which is specifically designed for light nodes in SAMSON. This means they apply exclusively to these nodes—perfect for tailoring visualizations. Their short name is li, making them easy to reference in your NSL expressions.
Here’s an overview of the light-specific attributes you can manage:
| Attribute name | Short name | Possible values | Examples |
|---|---|---|---|
| hidden | h |
true, false |
li.hnot li.h |
| name | n |
strings in quotes | li.n "A"li.n "L*" |
| selected | true, false |
li.selectednot li.selected |
|
| selectionFlag | sf |
true, false |
li.sf falseli.sf |
| visibilityFlag | vf |
true, false |
li.vf falseli.vf |
| visible | v |
true, false |
li.vnot li.v |
How to Use These Attributes in Practice
Let’s cover some practical scenarios where these attributes can be immensely helpful:
- Toggle Visibility for Light Nodes: Want to hide or display specific light nodes? Simply use
li.hfor hidden orli.vfor visible. For example:li.h truehides all light nodes, whileli.vfocuses on nodes marked as visible. - Batch Editing Based on Names: Do you need to target all light nodes starting with “L”? The
nameattribute comes to the rescue:li.n "L*"finds matching nodes, allowing you to apply further operations. - Selection Handling: Refine your workflow by selecting only the nodes you need.
li.selectedfilters selected nodes, whileli.sftoggles whether a light node is flagged for selection purposes.
Key Inherited Attributes
These attributes inherit behaviors from the node specification space:
hidden(h) toggles visibility.name(n) allows string-based identification.selectedmanages selection state.selectionFlag(sf) marks nodes selectively.visibilityFlag(vf) governs the node’s visibility flag.visible(v) confirms visibility.
Where to Start?
If you’re new to NSL or looking for more usage examples, check out the original Light Attributes documentation for in-depth insight on these attributes and how to manipulate them.
SAMSON and all SAMSON Extensions are free for non-commercial use, making advanced molecular modeling available to everyone. You can start using this powerful platform today by downloading it from SAMSON Connect.
