Understanding File Attributes in SAMSON’s Node Specification Language

Molecular modeling often involves managing complex data structures. If you have ever struggled with organizing and analyzing files efficiently within a molecular design platform, SAMSON’s Node Specification Language (NSL) provides a solution tailored for file nodes. Let’s dive into the file attributes from NSL to see how these tools can simplify your work.

What Are File Attributes in NSL?

In SAMSON’s NSL, file attributes belong to a specific file attribute space, and they allow you to define, filter, and manipulate file-related nodes. This is particularly relevant when working exclusively with file data. The short name used to reference this space is fi.

These attributes enable you to address important properties of files, such as names or selection status, and simplify their automation in your workflows. Let’s break down some key file attributes and how you can use them effectively:

Key File Attributes You Should Know

Attribute name Short name Possible values Examples
name n strings in quotes fi.n "A"
fi.n "L*"
selected true, false fi.selected
not fi.selected
selectionFlag sf true, false fi.sf false
fi.sf

1. The name Attribute

The name attribute makes it easy to identify file nodes by their names. Typically, you can leverage regular expressions to filter files matching certain patterns. For instance:

  • fi.n "A" targets a file with the exact name A.
  • fi.n "L*" targets all files with names starting with the letter L.

This makes searching for particular file nodes much more streamlined.

2. The selected Attribute

Want to analyze only those files currently selected in the dataset? The selected attribute comes in handy. It can be used to identify whether a file is selected (true) or not (false). Examples:

  • fi.selected: finds nodes that are selected.
  • not fi.selected: filters nodes that are not selected.

3. The selectionFlag Attribute

The selectionFlag (short name sf) adds another layer of customization to how you manage selection statuses within files. This attribute also accepts true or false values to specify whether a selection flag is set on the node. Consider these:

  • fi.sf false: identifies nodes where the selection flag is false.
  • fi.sf: finds nodes where the selection flag is true.

Why Use File Attributes?

Leveraging NSL file attributes offers molecular modelers precise and simplified control over their datasets. By using these attributes, you can:

  • Save time searching for specific files.
  • Automate repetitive tasks efficiently.
  • Ensure workflow consistency even with large datasets.

Tackling complex molecular design projects becomes much more manageable when your data is structured and accessible.

To go deeper into file attributes and their practical applications, don’t hesitate to consult the full documentation at File Attributes in NSL.

SAMSON and all SAMSON Extensions are free for non-commercial use. Download SAMSON now at SAMSON Connect.

Comments are closed.