Mastering Mesh Attributes in SAMSON

For molecular modelers delving into the SAMSON Integrative Molecular Design platform, efficiently managing and understanding mesh attributes in SAMSON’s Node Specification Language (NSL) can improve workflows significantly. Whether you’re working on structural analysis, visualization, or custom scripting, knowing how to query and manipulate mesh nodes is invaluable.

The mesh attribute space (short name: me) allows you to target and apply operations specifically to mesh nodes. These nodes are fundamental when working with molecular representations that involve complex surfaces, material properties, visibility settings, and more. Let’s explore what this space offers and how you can leverage it effectively.

Key Mesh Attributes in NSL

Here are some of the frequently used attributes within the mesh namespace and examples of their application:

Attribute Name Short Name Possible Values Examples
hasMaterial hm true, false me.hm
not me.hm
hidden h true, false me.h
not me.h
name n String (in quotes) me.n "A"
me.n "L*"
ownsMaterial om true, false me.om
selected true, false me.selected
not me.selected
selectionFlag sf true, false me.sf false
me.sf
visibilityFlag vf true, false me.vf false
me.vf
visible v true, false me.v
not me.v

Practical Example: Querying Mesh Visibility

One common use case is identifying which meshes are currently visible in a scene. For example, you can use the visible attribute (me.v) to filter for visible mesh nodes:

Similarly, if you want to find mesh nodes that are hidden, you can invert the query:

Inherited Attributes

The mesh namespace also inherits attributes from the broader node attribute space. These include properties like hasMaterial, hidden, and name. For example, the name attribute is useful for selecting mesh nodes by specific identifiers:

By combining these attributes in logical expressions, you can precisely target mesh nodes of interest, even in large and complex molecular models.

Conclusion

With a solid grasp of mesh attributes, SAMSON users can efficiently customize and automate their workflows, focusing on specific subsets of molecular data. Check out the detailed documentation at Mesh Attributes in NSL to explore more advanced examples and capabilities.

SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON here.

Comments are closed.