For molecular modelers, managing visualization presets effectively can save time and improve workflows during molecular modeling tasks. SAMSON, the integrative molecular design platform, provides a robust solution through its render preset attributes in the Node Specification Language (NSL). Understanding these attributes can significantly enhance how you handle render presets for molecular nodes.
The renderPreset attribute space (short name: rp) applies specifically to render preset nodes and inherits attributes from the more general node attribute space. Below, we will cover the key inherited attributes—name, selected, and selectionFlag—their usage, and examples to help you get started.
1. The name Attribute
The name attribute, inherited from node.name, allows you to assign or query names for render presets. This can be especially helpful when working with a large set of nodes, as it lets you identify render presets based on given names.
Examples:
rp.n "A"– Selects a render preset named “A”.rp.n "L*"– Selects all render presets with names starting with “L”.
2. The selected Attribute
The selected attribute indicates whether a render preset is selected (true) or not (false). This attribute differentiates itself from the parent node.selected by omitting a short name for simplicity. Querying or filtering nodes by their selection status can streamline tasks like applying batch operations to specific presets.
Examples:
rp.selected– Checks if a render preset is selected.not rp.selected– Filters render presets that are not currently selected.
3. The selectionFlag Attribute
The selectionFlag, inherited from node.selectionFlag, is used to flag render presets for selection-related tasks. It provides a quick way to define inclusion or exclusion criteria.
Examples:
rp.sf false– Sets theselectionFlagtofalsefor a render preset.rp.sf– Filters render presets where theselectionFlagis set totrue.
By mastering these attributes, molecular modelers can more efficiently organize and manipulate visualization presets within their projects. Whether identifying specific render presets by name, working with selected presets, or defining selection criteria via selection flags, the renderPreset attribute space provides the flexibility needed for advanced molecular visualization workflows.
For a comprehensive list of render preset attributes and detailed examples, visit the full documentation page here: https://documentation.samson-connect.net/users/latest/nsl/renderPreset/
SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON now at https://www.samson-connect.net.
