Simplifying Molecular Labeling with NSL Label Attributes in SAMSON

For molecular modelers, managing and filtering label nodes efficiently can be a challenging task, especially when working on complex systems. Fortunately, SAMSON offers a powerful feature within its Node Specification Language (NSL) to handle such scenarios: the label attribute space. In this blog post, we'll dive into how label attributes can help simplify workflows and improve productivity.

Understanding the Label Attribute Space

The label attribute space in SAMSON, shortened as la, is specifically designed for label nodes. It provides a set of attributes that allow users to manage visibility, selection, naming, and other parameters of labels in their molecular models. Whether you need to hide certain labels, select specific nodes, or manage visibility flags programmatically, these attributes can help streamline your tasks.

Key Label Attributes

Here's an overview of the main attributes within the la space:

Attribute name Short name Possible values Examples
hidden h true, false la.h
not la.h
name n strings in quotes la.n "A"
la.n "L*"
selected true, false la.selected
not la.selected
selectionFlag sf true, false la.sf false
la.sf
visibilityFlag vf true, false la.vf false
la.vf
visible v true, false la.v
not la.v

Practical Use Cases

Here are some examples to illustrate how these attributes can be used in everyday workflows:

  • If you want to hide all label nodes, use the expression la.h. Conversely, to show hidden labels, use not la.h.
  • To find labels with names starting with "L", you can write la.n "L*". Names in the n attribute can also be filtered using exact matches or partial string match patterns.
  • Managing the visible attribute (v) helps to toggle the overall visibility status of label nodes. For example, not la.v will identify all currently invisible labels.

Inherited Attributes

Several label attributes are inherited from the node attribute space, including:

Each of these can be combined into logical expressions to automate and refine your model workflows.

Conclusion

Label attributes in SAMSON's Node Specification Language provide users with efficient tools to manage molecular labels, improving both functionality and user experience. With these attributes, you can spend less time managing metadata and more time analyzing your molecular systems.

To explore more, visit the full documentation page about label attributes.

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

Comments are closed.