As a molecular modeler, managing and filtering molecular data efficiently can be a challenging task. Whether you are handling vast sets of molecular structures or processing simulation results, the need to organize, sort, and analyze information precisely is essential. That’s where the Node Specification Language (NSL) in SAMSON, specifically file attributes, can greatly assist you.
File attributes in SAMSON are part of the file attribute space (with the short name fi), designed explicitly for working with file nodes. These attributes allow you to specify and query file-related properties in your molecular modeling workflows. In this post, we’ll break down the most relevant file attributes you can use and provide practical examples to help you incorporate them into your projects.
Key File Attributes
The file attributes inherit several properties from the general node attribute space. Below are the primary attributes and how they can be utilized:
1. name
The name attribute (fi.n) is used to define or query a file node based on its name. For example, if you want to select files with a specific name, you can use:
fi.n "A"– Selects file nodes named exactly “A”.fi.n "L*"– Selects file nodes where the name starts with “L”.
Use this attribute to streamline your searches and efficiently locate files within your molecular design project.
2. selected
The selected attribute checks whether a file node is actively selected in the interface. Accepted values are true or false. Examples include:
fi.selected– Filters nodes that are selected.not fi.selected– Filters nodes that are not selected.
This is particularly useful for isolating selected file nodes for further analysis or when you need to perform actions on specific subsets of your dataset.
3. selectionFlag
The selectionFlag attribute (fi.sf) is another way to indicate whether a file node has a selection flag applied. Use it similarly to selected when working with custom workflows. Examples include:
fi.sf false– Filters nodes without a selection flag.fi.sf– Filters nodes with an active selection flag.
This capability offers flexibility in tagging and processing your file nodes.
Putting It All Together
By combining these attributes, you can construct powerful queries for working with file nodes in SAMSON. For instance:
|
1 |
fi.n "L*" and fi.selected |
This query selects all file nodes starting with the letter “L” that are also currently selected in the interface. Such combinations enable precise filtering and improve the efficiency of complex molecular modeling projects.
File attributes and their functionality save time and reduce errors, helping molecular modelers focus on design and scientific exploration. To explore the full documentation of file attributes, including inheritance details, visit the official documentation page.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.
