A Quick Guide to Efficiently Selecting Render Presets in SAMSON

When working with complex molecular scenes in SAMSON, molecular modelers often create multiple render presets to control how different parts of a system are visualized. But as your scenes grow more detailed, managing and selecting the right presets quickly can become cumbersome.

This post introduces you to several useful attributes in the renderPreset (or rp) attribute space of SAMSON’s Node Specification Language (NSL). These make it easier to filter, identify, and manage your render presets efficiently.

Why this matters

If you’ve ever applied the wrong visualization style because it was difficult to identify which preset was active or needed adjusting, you’re not alone. Molecular modeling involves not only simulating interactions but also visualizing data meaningfully. By using NSL to query and manipulate render presets based on specific attributes, you can avoid confusion and focus on insight.

Key attributes for render preset selection

The renderPreset attribute space provides several filters that allow precise selection of render presets. You can use these individually or combine them, depending on your needs:

Attribute Short name Values Example
name n Strings in quotes rp.n "A" or rp.n "L*"
selected true, false rp.selected or not rp.selected
selectionFlag sf true, false rp.sf false or rp.sf

1. Filtering by name

You can select all render presets with a specific naming scheme. For example:

This command helps isolate all presets related to electrostatics, assuming a consistent naming convention. This is especially useful when reorganizing visual elements or ensuring consistency in publication-quality images.

2. Finding selected presets

To identify which render presets are currently selected in your scene, use:

This can help avoid accidental edits to unwanted presets and focus on relevant parts of your model.

3. Using the selectionFlag attribute

The selectionFlag can distinguish visually marked presets from others. For instance:

… gives you all render presets that have been flagged, possibly for review or further tweaking.

Tips for better workflow

  • Combine filters. For example, to find all selected render presets whose names start with “Hydrogen”:
    rp.selected and rp.n "Hydrogen*"
  • Avoid mistakes. Use not rp.selected to safely edit unselected presets.
  • Batch operations. Once selected, render presets can be modified in groups, saving time.

Learning to use these simple filters makes NSL in SAMSON an effective ally, especially when you’re working with large, multi-model simulations or preparing illustrative figures.

To learn more about these attributes and how to use them, visit the official documentation page: 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.