Understanding File Node Attributes in SAMSON

For molecular modelers using SAMSON, working with a multitude of files is an everyday task. However, managing and filtering these files efficiently can be a challenge. To address this, the Node Specification Language (NSL) in SAMSON provides a powerful way to standardize and handle file-related data by defining specific attributes for file nodes.

What Are File Attributes?

File attributes in SAMSON are part of a specialized file attribute space (with the shorthand fi). These attributes apply exclusively to file nodes and inherit some attributes from the generic node attribute space. This allows users to leverage familiar structures while introducing file-specific functionalities.

Key File Attributes

Here are the most prominent file attributes you should be aware of when designing workflows or managing data in SAMSON:

  • Name (fi.n): This attribute allows you to specify or filter files based on their names. The names can be input as strings inside quotes. For example, fi.n "A" targets a file whose name is “A,” while fi.n "L*" selects files whose names start with “L.”
  • Selected (fi.selected): This attribute indicates whether the file node is currently selected or not. It accepts true or false values. You can use it to target selected files (fi.selected) or exclude them (not fi.selected).
  • SelectionFlag (fi.sf): This attribute is inherited from the node attribute space and helps mark files with a selection flag. Similar to fi.selected, it accepts boolean values true and false. For example, fi.sf false targets file nodes where the selectionFlag is false.

Why Is This Useful?

Imagine you’re visualizing a large molecular system with dozens of associated files, and you only want to manipulate or query specific files. Using these attributes, you can:

  • Filter files based on their specific names (e.g., “selecting files starting with ‘L'”).
  • Easily identify which files are selected or flagged for further operations.
  • Combine attributes with logical operations in complex queries, enabling you to parse and manage data at scale.

Real-World Examples

Here are a couple of sample queries to get the most out of these attributes:

  • fi.n "Protein*" and fi.selected: Select all files starting with the name “Protein” that are currently marked as selected.
  • not fi.sf: Identify all file nodes lacking a selection flag. This is useful for excluding irrelevant files before applying further processing.

Learn More

File attributes significantly enhance the power of SAMSON’s Node Specification Language by allowing molecular modelers to work with file data efficiently and intuitively. To explore all the possibilities and dive deeper into the technical details, visit the official documentation at https://documentation.samson-connect.net/users/latest/nsl/file/.

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

Comments are closed.