Understanding File Attributes in SAMSON’s Node Specification Language

For computational molecular modelers, organizing and managing a multitude of molecular files and their attributes can often be a challenging task. This is where SAMSON, the molecular design platform, simplifies the process with its Node Specification Language (NSL), particularly through the concept of file attributes.

File attributes provide an efficient way to specify properties of file nodes. These attributes reside in the file attribute space, often abbreviated as fi. By properly utilizing these attributes, modelers can enhance their workflows, organize their data, and automate common tasks effectively. Let’s dive into how this works!

The Core File Attributes

There are three major attributes you can use within the file attribute space:

  • name (n): This attribute allows you to define or filter file nodes based on their names. The names are written as strings in quotes. For example:
    • fi.n "A" selects file nodes with the name A.
    • fi.n "L*" matches file nodes with names starting with L.
  • selected: If you need to focus on file nodes marked as selected, this attribute is a great tool. It has two possible values:
    • fi.selected selects file nodes that are currently selected.
    • not fi.selected filters out the selected ones.

    Interestingly, this attribute is inherited from the general node.selected attribute but doesn’t have a corresponding short name.

  • selectionFlag (sf): This attribute helps specify whether a file node has its selection flag set to true or false. Example usage includes:
    • fi.sf false to exclude nodes with their selection flag turned on.
    • fi.sf to directly filter nodes with the flag.

The Inheritance Advantage

A key feature of file attributes is that they are inherited from the broader node attribute space. This inheritance ensures consistency and flexibility, allowing users familiar with node attributes to adapt their knowledge seamlessly to work with file-specific properties. For instance, the name and selectionFlag attributes function similarly in both contexts, making the learning curve gentle.

Integrate File Attributes into Your Workflow

By effectively using these file attributes, you can:

  • Streamline file searches using regular expressions with the n attribute.
  • Quickly isolate specific file nodes for editing or analysis using selected.
  • Precise your selections with the sf attribute to manage batch operations.

This means fewer manual operations, reduced errors, and better organization of your molecular data.

Learn More and Get Started

These are just the essentials to get you started with file attributes in SAMSON’s Node Specification Language. To explore the details and examples further, visit the complete documentation here.

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

Comments are closed.