Molecular modelers often work with complex data sets, and efficiently managing and querying these data is crucial. With SAMSON’s Node Specification Language (NSL), accessing and filtering information about file nodes can be streamlined, saving time and reducing errors. In this blog post, we’ll dive into the file attributes in NSL and help you understand how to use them in your workflow.
What Are File Attributes in NSL?
The file attributes belong to the file attribute space (short name: fi) and are used to interact specifically with file nodes in SAMSON. This structure enables precise selection and querying of attributes, ensuring that only the required nodes are targeted. File attributes inherit some properties from the broader node attribute space but are tailored for file nodes.
Key File Attributes and Their Uses
Here is a breakdown of some of the most commonly used file attributes and their applications:
| Attribute Name | Short Name | Possible Values | Examples |
|---|---|---|---|
| name | n |
Strings in quotes |
fi.n "A"fi.n "L*"
|
| selected | — | true, false |
fi.selectednot fi.selected
|
| selectionFlag | sf |
true, false |
fi.sf falsefi.sf
|
Detailed Explanations
To better understand how these attributes work, let’s explore each one:
- name: This attribute allows you to query file nodes by their name. For instance, if you want to target a specific file named “A,” use
fi.n "A". Wildcards like “L*” can also be used to match multiple files with names starting with “L.” - selected: This attribute checks whether a file node is selected. It returns
trueorfalse. For example,fi.selectedlists all selected file nodes, whilenot fi.selectedretrieves unselected ones. - selectionFlag: This attribute functions similarly to
selectedbut in connection with a specific flag. For instance, you can check or set the selection state using expressions likefi.sf falseto query file nodes with theirselectionFlagset tofalse.
Streamlining Your Workflow
By familiarizing yourself with these attributes, you can filter and manage file nodes efficiently. Whether you are organizing data, identifying specific sets of files, or applying predefined conditions, these tools give you flexibility without requiring extensive manual work. This can be particularly beneficial in large-scale molecular modeling projects where precision and organization are essential.
Learn More
For a complete list of file attributes and their possible applications, visit the official documentation page here: SAMSON File Attributes Documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.
