In molecular modeling, displaying and analyzing specific details of your models efficiently can make a significant difference in productivity and insights. SAMSON, the integrative molecular design platform, offers powerful tools to customize and manage how visual models are represented, thanks to the visualModel attribute space in the Node Specification Language (NSL).
Are you struggling to manage how your visual models behave and appear? Understanding the visualModel attribute space provides a structured yet intuitive way to control key parameters such as visibility, selection, and material ownership for your molecular nodes. Here’s a quick guide to help you harness the potential of these attributes effectively.
What is the Visual Model Attribute Space?
The visualModel attribute space (short name: vm) is dedicated to attributes that apply specifically to visual model nodes in SAMSON. These attributes determine how those nodes behave and are displayed. They inherit many properties from the general node attribute space with additional exclusive features.
Key Attributes of visualModel
Below are some key attributes in the visualModel space, along with their short names, possible values, and examples:
- hasMaterial (
hm): Indicates whether a visual model has associated material. Possible values:trueorfalse. Example:vm.hm,not vm.hm. - hidden (
h): Determines if the model node is hidden. Possible values:trueorfalse. Example:vm.h,not vm.h. - name (
n): The name of a node, as a string. This is useful for searching or filtering specific visual models. Example:vm.n "A",vm.n "L*". - ownsMaterial (
om): Indicates whether the visual model owns a material. Possible values:trueorfalse. Example:vm.om. - visible (
v): Determines whether the node is visible. Possible values:trueorfalse. Example:vm.v,not vm.v. - selectionFlag (
sf): Represents whether specific nodes are flagged for selection operations. Possible values:trueorfalse. Example:vm.sf,vm.sf false.
Why Use These Attributes?
By leveraging these attributes, you can:
- Filter models based on specific criteria (e.g., visibility).
- Drive scripted automation for tasks like toggling visibility or selection flags.
- Organize your models effectively by naming and categorizing them.
For instance, toggling hidden or visible allows you to focus on specific portions of a complex molecular scene. Similarly, querying properties with selectionFlag can help you streamline workflows, especially in large-scale projects.
Examples in Action
Here are two quick examples to illustrate practical use:
- Hiding a node: To activate or deactivate the visibility of a model node, use
vm.hornot vm.h. - Filtering nodes by name: If nodes within your molecular system are named (e.g., “Ligand”, “Protein”), you can search them using
vm.n "Ligand".
Understanding these operations ensures your modeling processes are precise and tailored to your needs.
Explore the complete documentation on visual model attributes to further enhance your molecular modeling workflow: Learn more.
SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON at https://www.samson-connect.net.
