If you’re a molecular modeler leveraging SAMSON for your projects, you might have encountered situations where controlling the appearance and behavior of visual models becomes critical. Whether it’s simplifying model visibility or organizing data, SAMSON’s visualModel attribute space offers numerous possibilities for effectively managing how your visual representations behave in the platform.
What Are Visual Model Attributes?
In SAMSON, the visualModel attribute space, with the shorthand name vm, contains attributes that apply exclusively to visual model nodes. These attributes provide a flexible way to define properties like visibility, selection flags, and more. They help you make visual models more dynamic and interactive while maintaining alignment with the molecular design workflow.
Here’s a quick summary of some key attributes:
vm.v– Determines if a visual model is visible.vm.h– Indicates if the visual model is hidden.vm.hm– Checks if the model has material definitions.vm.n– Searches for a model by name.vm.sf– Specifies the selection flag for the model.
Let’s Explore Key Attributes in Detail
Visibility and Selection
One of the most basic functionalities involves controlling whether a visual model is visible or hidden. Using vm.v (for visibility) and vm.h (for hidden), you can manage this dynamically:
vm.v– Queries visibility (trueorfalse).not vm.h– Ensures the model isn’t hidden.
These attributes are especially useful when you need to isolate or visualize specific components in large systems, helping you work with clarity and precision.
Matching Names
Looking to locate or filter specific visual models by name? The vm.n attribute lets you use string-based queries to select models:
vm.n "A"— Finds models with the name “A.”vm.n "L*"— Matches all models with names starting with “L.”
Material-Based Properties
In molecular modeling, material properties often carry essential context. Attributes such as vm.hm (for hasMaterial) and vm.om (for ownsMaterial) provide insights into whether visual models currently use or own materials. An example:
vm.hm— Checks if the visual model uses any materials.vm.om— Indicates whether the visual model is tied to proprietary material data.
Fine-Tuning Selection and Flags
Attributes like vm.sf (selectionFlag) and vm.selected allow for greater customization of how visual models are marked for editing or interaction. For example:
vm.sf false— Clears selection flags for a visual node.vm.selected— Queries if the node is currently selected in the workspace.
Practical Examples for Everyday Use
Imagine you’re working with a dense molecular structure and want to isolate components for editing. You can use vm.h to hide irrelevant parts while focusing on a specific area. With vm.n, you can quickly return specific nodes by name. Combining attributes allows for complex, yet highly efficient workflows, keeping your visual workspace aligned with your scientific goals.
These attributes are inherited from the broader node attribute space, ensuring consistency across your design framework.
Learn More
These are just a few highlights of the possibilities offered by the visualModel attribute space. If you want to delve deeper into the details, explore the full documentation at https://documentation.samson-connect.net/users/latest/nsl/visualModel/
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.
