Molecular modelers working on complex simulations often encounter the challenge of efficiently managing and filtering visual model nodes in complex scenes. With SAMSON’s Node Specification Language (NSL), the process of navigating large molecular systems becomes more manageable thanks to its visualModel attribute space. This blog post will guide you through some key attributes in the visualModel space to streamline your modeling workflows.
Why Are Visual Model Attributes Important?
When working on molecular models, users must often identify, filter, or manipulate specific parts of a system. For example, in scenes containing multiple molecular representations, pinpointing all visible elements or nodes associated with particular materials can save significant time. NSL’s visualModel attributes make these operations straightforward using concise expressions.
Key Visual Model Attributes
Below are some of the most useful visualModel attributes provided by NSL, their shorthand versions, and practical use cases:
| Attribute Name | Short Name | Possible Values | Examples |
|---|---|---|---|
| hasMaterial | hm |
true, false |
vm.hm, not vm.hm |
| hidden | h |
true, false |
vm.h, not vm.h |
| name | n |
Strings in quotes | vm.n "A", vm.n "L*" |
| visibilityFlag | vf |
true, false |
vm.vf false, vm.vf |
Practical Example of Usage
Suppose you are working on a molecular visualization where several nodes are obscured. Using NSL, you can filter out hidden nodes and focus exclusively on visible ones with a simple query:
|
1 |
vm.v |
You might also want to quickly locate nodes that “own material.” This is particularly helpful when searching for nodes with specific visual properties:
|
1 |
vm.om |
Additionally, you can search for nodes by their specific names or patterns:
|
1 |
vm.n "Molecule_A" |
For more dynamic refinement, the shorthand versions of these attributes (e.g., h for “hidden” or n for “name”) make complex queries shorter and easier to read.
Inherited Attributes for Seamless Integration
A noteworthy feature of the visualModel attribute space is its link to the broader node attribute space. Many of the attributes, including hasMaterial, hidden, and visible, are inherited but tailored specifically for visual model nodes. This inheritance ensures consistency across your queries while focusing on the visual aspects.
One important note: while most attributes retain their short names from the general node space, there’s an exception. The selected attribute in visualModel does not have a shorthand name. However, leveraging the full attribute name (vm.selected) ensures you can easily refine your selection criteria when needed.
Optimization Through Clarity
The addition of the visualModel attribute space in SAMSON’s NSL offers an efficient route for molecular modelers to organize and manipulate models with clarity. By mastering key attributes like vm.v or vm.hm, you can make your workflows smoother and more productive. Whether you are working with a handful of molecules or a sprawling molecular complex, these tools help eliminate guesswork and redundancy.
To explore all visual model attributes in detail, visit the original documentation page: https://documentation.samson-connect.net/users/latest/nsl/visualModel/.
SAMSON and all SAMSON Extensions are free for non-commercial use. To get started, download SAMSON at https://www.samson-connect.net.
