A Step-by-Step Guide to Node Group Attributes in SAMSON’s NSL

For molecular modelers, managing and organizing various nodes effectively is pivotal to streamline workflows and enhance design accuracy. SAMSON’s Node Specification Language (NSL) provides a potent toolset, and understanding its node group attributes can simplify your modeling process.

If you’ve ever struggled to efficiently categorize or interact with node groups, this guide will help you better understand how to utilize node group attributes in NSL. These attributes allow you to filter, visualize, and manipulate node groups with precision.

What Are Node Group Attributes?

In SAMSON, node group attributes define properties and behavior specific to node groups. These attributes are represented in a particular attribute space called nodeGroup (short name: ng), which exclusively focuses on node group nodes. By using these attributes, you can:

  • Identify node groups by names or patterns
  • Check or modify selection statuses
  • Apply logic to refine selections

Key Node Group Attributes at a Glance

Here’s a summary of the most commonly used attributes for node groups, along with their short names and examples:

Attribute Name Short Name Possible Values Example Expressions
name n Strings in quotes ng.n "A"
ng.n "L*"
selected (no short name) true, false ng.selected
not ng.selected
selectionFlag sf true, false ng.sf false
ng.sf

Each attribute has a specific use case. For instance:

  • Name Attribute: Use the name attribute to match node groups by exact names or patterns, e.g., ng.n "L*" selects all node groups whose names start with “L”.
  • Selected Attribute: This lets you check whether a node group is selected or not. For example, ng.selected fetches all the selected node groups.
  • SelectionFlag Attribute: The selectionFlag (short name sf) provides another indicator of node group selection states, useful for more specific logic.

Why Should You Care?

Instead of manually inspecting or highlighting components in complex molecular structures, leveraging these attributes saves time and ensures accuracy. For instance:

  • Quickly identify node groups for modification or analysis using ng.n.
  • Toggle node group visibility in selection workflows by combining selected and selectionFlag.

These tools make molecular design tasks more manageable, especially in projects with large data sets.

Where Are These Attributes Inherited From?

Some attributes in the nodeGroup space, such as name, selected, and selectionFlag, originate from the general node attribute space. However, there are slight differences. For example, though selected is inherited, its short name (s) is not applicable in the nodeGroup space.

Learn More

Mastering node group attributes is a game-changer for smoothing out node management challenges in molecular modeling workflows. To dive deeper, visit the official documentation page here: Node Group Attributes Documentation.

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

Comments are closed.