Quickly Filter Your Molecular Render Presets in SAMSON with These NSL Attributes

Rendering molecular systems often involves combining clarity and aesthetic precision. In SAMSON, a powerful molecular design platform, users can assign different render presets to define how components are visually represented—whether it’s ribbons, surfaces, or atom spheres. But sorting or filtering through many custom presets can become tedious without a structured approach.

Enter the Node Specification Language (NSL), an expressive way to query and interact with entities in SAMSON. In this post, we focus on a practical subset of NSL attributes that help you work more efficiently with render preset nodes. These attributes let you filter and select render presets based on their name, selection state, and selection flag—all without scripting.

Why It Matters

Molecular modelers often create several visual presets to explore different representations or to prepare figures. For large systems or during collaborative work, you may need to quickly isolate render presets associated with particular regions, meanings, or authorship tags. Navigating through the node editor manually can slow you down.

Using attributes like rp.n (name) or rp.selected gives you immediate control over what you’re looking at—boosting both efficiency and focus.

Using Render Preset Filters in NSL

All render preset filters belong to the renderPreset attribute space in NSL, abbreviated as rp. Here’s what you can specify:

  • rp.n – Name: Filter presets by name. This is especially useful when you’ve named your presets using conventions (e.g., “Hydrophobic”, “SurfaceView”, etc.).

    Example: rp.n "Hydro*" to select render presets whose name starts with “Hydro”.

  • rp.selected – Selection state: Filter whether a render preset node is currently selected. This comes in handy when you’re working interactively.

    Example: rp.selected to retrieve all currently selected presets; or not rp.selected for the inverse.

  • rp.sf – Selection flag: Identifies whether a preset is flagged for selection.

    Example: rp.sf false to find render presets not flagged for selection.

You can even combine filters:

This returns only those render presets starting with “Surface” that are flagged for selection—ideal when generating figures.

Common Use Cases

  • Cleanup: Delete multiple render presets in one go by selecting them with NSL filters.
  • Automation QA: Confirm that newly generated visuals respect naming conventions or flags.
  • Teaching & Presentation: Switch between various visual styles quickly by querying useful groups.

These filters may appear simple, but they save time and reduce tedium across common workflows. Combined with other NSL capabilities, they allow advanced selection logic across an entire molecular project.

Learn more in the full documentation.

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

Comments are closed.