Simplify Molecular Node Selection with File Attributes in SAMSON

Molecular modelers often face challenges managing large datasets of molecular nodes. Identifying specific files in complex environments can feel overwhelming. This is where file attributes in SAMSON’s Node Specification Language (NSL) can become indispensable for managing and querying molecular nodes effectively. Let’s explore how these attributes can simplify your workflow.

What Are File Attributes?

In SAMSON, file attributes belong to the file attribute space, referred to by the short name fi. These attributes apply specifically to file nodes and serve as tools to streamline searches and operations. This blog post will focus on three key attributes you can use with file nodes: name, selected, and selectionFlag.

name: Identifying Files by Name

The name attribute lets you search for file nodes using their names. Whether you’re hunting for a single file or a pattern of names, this attribute can be a huge time-saver.

Possible Values: Any string enclosed in quotes.

Examples:

  • fi.n "A" will match a file node with the name A.
  • fi.n "L*" enables you to search for files whose names start with L.

This attribute is inherited from the general node.name, adding consistency across all nodes in SAMSON.

selected: Refining Your Focus

The selected attribute makes it easy to filter and act specifically on selected file nodes in your molecular project. This attribute evaluates to true or false.

Examples:

  • fi.selected: Matches all selected file nodes.
  • not fi.selected: Matches all unselected file nodes.

Unlike the general node.selected, this file attribute does not have a short name, ensuring that it applies explicitly to file nodes.

selectionFlag: A Flag for Batch Selection

Need a flexible way to assign and manage selection states for file nodes? The selectionFlag attribute has you covered. Use it to toggle and query selection flags in your dataset, enabling batch selection or exclusion.

Possible Values: true and false.

Examples:

  • fi.sf false: Matches file nodes that are flagged as not selected.
  • fi.sf: Matches file nodes that are flagged as selected.

This attribute reflects the node.selectionFlag, expanding the possibilities for targeted operations on file nodes.

Why File Attributes Matter

For molecular designers managing large systems, these file attributes drastically reduce the time spent navigating and filtering file nodes. Whether you are organizing files by name, working exclusively on selected nodes, or using selection flags to create dynamic workflows, file attributes provide a structured and intuitive approach.

Learn More

To get more details and discover additional examples, visit the original documentation page: https://documentation.samson-connect.net/users/latest/nsl/file/.

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

Comments are closed.