For molecular modelers, working with extensive data structures can often feel overwhelming. Whether organizing molecular data or performing complex queries on structures, having a precise control mechanism is vital. That’s where SAMSON’s folder attribute space in the Node Specification Language (NSL) steps in to make life easier.
Why Folder Attributes Matter
Folders in SAMSON help organize and manage molecular data hierarchically. However, just organizing isn’t enough—you need tools to query and manipulate the data effectively. The folder attribute space is designed precisely for this purpose, allowing you to interact with properties such as atom counts, molecular chains, visibility, and more.
Key Features of the Folder Attribute Space
The folder attribute space (folder, short name f) offers a range of predefined attributes that cover mathematical, structural, and visual properties of folder nodes. Let’s take a closer look at some of these attributes with practical examples:
- Count molecules: Use
folder.numberOfMolecules(f.nm) to query folders based on the number of molecules they contain. For example,f.nm 2:4matches folders with 2 to 4 molecules. - Hydrogen atom count: The
folder.numberOfHydrogens(f.nH) attribute lets you match folders by their hydrogen atom count. For instance,f.nH 10:20finds folders with 10 to 20 hydrogen atoms. - Visibility control: Attributes like
folder.visibilityFlag(f.vf) andfolder.hidden(f.h) ensure that you can programmatically control whether folders and their contents are visible in your workspace.
Examples in Practice
Say you’re analyzing different molecular structures and want to filter for those containing a specific number of atoms, such as between 100 and 200. Using the folder.numberOfAtoms attribute:
|
1 |
f.nat 100:200 |
Not only can you filter specific structures, but you can also combine these attributes when performing queries. For example, if you need folders with more than 3 molecules but fewer than 10 carbons, you can combine:
|
1 |
f.nm > 3 and f.nC < 10 |
Inherited Attributes
Many folder attributes are inherited from the node attribute space, giving you the flexibility to generalize folder queries without needing additional setup.
Some commonly inherited attributes include:
visible (v): Check whether a folder is visible in the workspace.selected: Identify whether a folder is selected.hasMaterial (hm): Test for material-specific data associated with a folder.
Systematic Molecular Design
The ability to systematically design, analyze, and filter molecular models saves time and improves precision. Attributes like folder.numberOfAtoms and folder.partialCharge provide quick insights into the chemical makeup and properties of molecular models at the folder level. Whether you’re investigating chemical charges with f.fc (formal charge) or organized segment counts with f.ns, SAMSON’s folder attribute space ensures that you gain actionable control over hierarchical data.
Learn More
Understanding and leveraging folder attributes can transform how you manage molecular data. To explore the complete documentation, visit the official SAMSON NSL folder reference: https://documentation.samson-connect.net/users/latest/nsl/folder/.
SAMSON and all SAMSON Extensions are free for non-commercial use. Curious to try it out? Get SAMSON today at www.samson-connect.net.
