Quickly Find and Edit Render Presets Using NSL Filters in SAMSON

When working with complex molecular systems, visual clarity is essential. Render presets in SAMSON—the integrative molecular design platform—help users control how molecular objects are displayed. Whether you’re comparing different visual styles or identifying specific render setups in a large workspace, managing render presets effectively is crucial.

Fortunately, SAMSON’s Node Specification Language (NSL) offers a simple and powerful way to filter and manipulate render presets through attributes. If you’ve ever been overwhelmed by numerous render presets or struggled to locate a specific one, using NSL filters in the renderPreset space can save you time and reduce visual clutter.

Why Use NSL for Render Presets?

In a molecular model containing dozens or even hundreds of render settings, hunting down one specific style or identifying unused presets is challenging. NSL fields like rp.n (for name) and rp.sf (for selection flags) help you directly target the presets you want to interact with.

Useful Render Preset Attributes

Render presets use the attribute space renderPreset (short name: rp), and inherit some fields from the more general node attribute space. Here are the key filters:

Attribute Description Example Usage
rp.n Matches render presets by name. You can use wildcard characters like *. rp.n "A"
rp.n "L*"
rp.selected Checks whether a render preset is currently selected. No short name. rp.selected
not rp.selected
rp.sf Indicates whether the render preset is in the selection buffer. rp.sf
rp.sf false

Real-World Examples

Imagine you’ve defined multiple visual styles for proteins named “Ligand A”, “Ligand B”, and “Ligand C”. To list all presets associated with Ligands, use:

Need to find which render presets are selected? Try:

Want to select everything except presets currently highlighted? Use:

If you’re building a script or workflow that updates only presets no longer in use, filter with:

This can be helpful for cleanup workflows that reduce clutter in large models. Select and delete unneeded presets programmatically.

Helpful Tips

  • You can combine predicates: rp.n "L*" and not rp.sf
  • Names are case-sensitive, so be precise in match patterns
  • Selection predicates are valuable when scripting or batch editing
  • These attributes are inherited from the broader node space, providing consistency across different node types in NSL

Mastering just these few filters can significantly streamline your workflow, giving you more control over complex scenes and saving valuable time during rendering and visualization tasks.

To learn more, visit the complete NSL documentation for render presets: https://documentation.samson-connect.net/users/latest/nsl/renderPreset/

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

Comments are closed.