For molecular modelers using SAMSON, efficiently managing and querying molecular data is essential. One of the pain points often encountered is defining and working with file-level attributes in a way that is both systematic and flexible. This is where the Node Specification Language (NSL) in SAMSON can help. In this post, we delve into SAMSON’s file attribute space and its utility for file node management.
Why File Attributes Matter
File nodes are fundamental when working with molecular systems and associated data. Consider a typical workflow: you might load various molecular files, select specific subsets for analysis, or apply filters to identify data patterns. Being able to precisely define and query file-level attributes such as file names or selection states allows for more efficient, reproducible workflows.
The Basics: File Attribute Space
In NSL, file nodes utilize the file attribute space, with a short name of fi. This means you can efficiently write expressions targeting file nodes. File attributes also inherit some properties from the broader node attribute space, with subtle refinements and exclusions.
Key Attributes
| Attribute Name | Short Name | Possible Values | Examples |
|---|---|---|---|
| name | n |
Strings in quotes |
fi.n "A"fi.n "L*"
|
| selected | (none) | true, false |
fi.selectednot fi.selected
|
| selectionFlag | sf |
true, false |
fi.sf falsefi.sf
|
Deep Dive into Attributes
Let’s explore the key file-level attributes and their practical applications:
name
The name attribute identifies the name of a file node. For precise filtering, use quoted strings. For example:
fi.n "A"matches nodes with the exact name “A”.fi.n "L*"matches nodes where names start with “L”.
Note: The name attribute is inherited from the broader node space but retains its short name here for convenience.
selected
The selected attribute reflects a node’s selection state within SAMSON. Unlike its counterpart in the node space, it does not use a short name. For example:
fi.selected: Targets selected file nodes.not fi.selected: Excludes selected file nodes.
selectionFlag
The selectionFlag attribute is another selection-related property inherited from the node space. It does retain a short name, sf, for brevity. Examples include:
fi.sf true: Matches nodes with the selection flag enabled.fi.sf false: Matches nodes with the selection flag disabled.
Why This Matters for Molecular Modelers
NSL’s file attribute space simplifies working with file-level data, ensuring modelers can easily retrieve and filter relevant information. For instance, quickly identifying all selected file nodes or locating files with specific naming patterns enhances productivity by minimizing manual steps.
To dive deeper into the file attribute space in SAMSON’s Node Specification Language, visit this page.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
