Molecular modelers often need to streamline and customize their workflows in molecule visualization and analysis. One way to do this efficiently within SAMSON, the integrative molecular design platform, is by mastering the visualModel attributes in the Node Specification Language (NSL). In this post, we’ll explore what these attributes are and how you can harness them to tailor your visualizations effectively, while saving time.
What Are Visual Model Attributes?
The visualModel attribute space, or simply vm for short, defines a collection of attributes specifically related to visual model nodes in SAMSON. These attributes allow you to control aspects like visibility, material ownership, and naming, among others. They are incredibly handy for ensuring your molecular models display the way you need them to, whether you’re focusing on clarity or specific features of interest.
Key Attributes at a Glance
Here’s a summary of some of the most commonly used visualModel attributes, along with examples of how they can be employed in practice:
| Attribute Name | Short Name | Possible Values | Examples |
|---|---|---|---|
| hasMaterial | hm |
true, false |
vm.hm (has material)not vm.hm (does not own material) |
| hidden | h |
true, false |
vm.hnot vm.h |
| name | n |
strings in quotes | vm.n "A" (matches name A)vm.n "L*" (matches names starting with L) |
| ownsMaterial | om |
true, false |
vm.om |
| visible | v |
true, false |
vm.vnot vm.v |
How Can These Attributes Help You?
The visible attribute (vm.v) is a great place to start. If you’re working with a large assembly, you might choose to display only specific model components to enhance clarity by setting vm.v to true for items of interest and false for noise. Similarly, hidden attributes can help you manage what stays in the background.
For more advanced workflows, attributes like hasMaterial and ownsMaterial ensure that your visualized components properly handle assigned materials, which is vital in situations requiring accurate rendering or export. Combining this with naming attributes like name, modeled as vm.n, offers unmatched flexibility for targeted visual adjustments.
Why It’s Worth Mastering NSL Attributes
Visualizing molecular data is about more than making models look good – it’s about extracting insights. By fine-tuning visual attributes programmatically, you can work faster and communicate data-driven results better. These attributes simplify repetitive tasks and reduce human error, a valuable advantage when iterating over complex designs.
Feel ready to start implementing this knowledge? The full list of attributes, along with additional details and examples, is available in the official documentation. Dive deeper and supercharge your molecular modeling processes with SAMSON’s Node Specification Language!
Learn more about Visual Model attributes here.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON here.
