An Introduction to Render Preset Attributes in SAMSON

For molecular modelers, effectively managing and visually organizing molecular structures can sometimes be a challenging task. This is where SAMSON’s Node Specification Language (NSL) becomes particularly helpful, especially when using render preset attributes to clarify and enhance models.

In this blog post, we’ll introduce you to render preset attributes, their purpose, and how you can use them to streamline the visual representation of molecular designs. By leveraging these attributes, you can more easily manipulate render preset nodes and create organized and visually intuitive molecular models.

What Are Render Preset Attributes?

Render preset attributes belong to the renderPreset attribute space (short name: rp). These attributes are inherently designed for render preset nodes, allowing modelers to control and specify visual elements of a molecular design in ways that make their workflows more efficient and organized.

Let’s break down the most commonly used attributes included in the render preset attribute space:

1. Name

The name attribute (short name: n) allows you to assign or filter by a name assigned to a render preset node. It is useful for categorizing or identifying specific render presets. You can assign names as strings enclosed in quotes. Here are examples:

  • rp.n "A": Matches a render preset node named “A”.
  • rp.n "L*": Matches render preset nodes whose names start with the letter “L”.

2. Selected

The selected attribute functions as a simple boolean—true or false—indicating whether a render preset node is selected. Example usage:

  • rp.selected: Matches nodes that are selected.
  • not rp.selected: Matches nodes that are not selected.

It’s a straightforward way to handle node selection in visual and logical workflows.

3. SelectionFlag

The selectionFlag attribute (short name: sf) provides another boolean indicator, allowing you to determine if a node’s selection flag is enabled. Use cases include:

  • rp.sf false: Matches nodes where the selection flag is explicitly set to false.
  • rp.sf: Matches nodes with the selection flag enabled.

This simplifies workflows by making conditional filtering of nodes possible based on selection states.

Why Use Render Preset Attributes in SAMSON?

For molecular modelers, these attributes present powerful tools to maintain clarity and precision while working on complex designs. For instance:

  • Filter and modify render presets based on their names for better categorization.
  • Dynamically interact with selected or non-selected nodes while visualizing molecular structures.
  • Use the selectionFlag to conditionally highlight or hide render presets during presentations or documentation reviews.

Conclusion

Using render preset attributes can save time and reduce errors when managing complex molecular models. To dive deeper into their capabilities and see additional examples, visit the original documentation page here: https://documentation.samson-connect.net/users/latest/nsl/renderPreset/.

SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.

Comments are closed.