Molecular modeling often involves navigating through hierarchical and complex structures. Whether you're organizing molecular simulations, managing datasets, or simply creating logical groupings for molecular entities, folders play a vital role in structuring your molecular design projects. But how do you manipulate and query folder-related data with precision? Enter the folder attributes of SAMSON's Node Specification Language (NSL).
Why Are Folder Attributes Important?
If you’re working with molecular simulations, managing folder nodes efficiently is crucial. For example, you might want to know:
- How many atoms are present in folders?
- What is the total formal charge of structures within certain folders?
- Are some folders visible or hidden?
The ability to use specific attributes to refine folder-related searches and processes can save significant time and improve your workflow.
Getting Started with Folder Attributes
In SAMSON's NSL, folder attributes belong to the folder attribute space, with the short name f. This makes it easy to query folders specifically, without accidentally including non-folder nodes.
For example, if you only wish to find folders that are hidden, you can use:
f.h true
This checks whether folders are labeled as hidden. It’s worth noting that some attributes are inherited from SAMSON's general node attributes, while others are unique to folder nodes.
Core Folder Attributes
Here’s a breakdown of some critical folder attributes and how you can use them:
f.nat(numberOfAtoms): Matches folders with a specific number of atoms. Example:f.nat > 100to find folders with more than 100 atoms.f.fc(formalCharge): Filters folders based on their total formal charge. Example:f.fc 6:8finds folders with a formal charge between 6 and 8.f.nH(numberOfHydrogens): Targets folders with a specific count of hydrogen atoms. Example:f.nH 10:20identifies folders with hydrogen atoms ranging from 10 to 20.f.nm(numberOfMolecules): Retrieves folders containing specified numbers of molecules. Example:f.nm < 3for folders with fewer than 3 molecules.f.v(visible): Determines whether a folder is visible or hidden. Pair it withnotfor flexibility:not f.v.
Leveraging these attributes, modelers can quickly isolate nodes that meet precise project requirements.
Example Use Case: Counting Atoms in Folders
Suppose you’re running a molecular simulation and need to identify all folders containing between 100 and 200 atoms. Implement this query using:
f.nat 100:200
This precision ensures that you focus only on the folders critical to your analysis.
Advanced Queries with Specific Attributes
Folder attributes extend beyond simple queries. For instance, what if you want folders with:
- A specified range of coarse-grained atoms? Use
f.ncga 100:200. - Residues greater than 130? Execute
f.nr > 130. - A unique number of chains? Apply
f.nc 2:4.
This flexibility allows for customizable data searches ideal for large or complex structural projects.
Learn More
Understanding folder attributes is a game-changer in organizing and processing molecular models. Explore SAMSON’s full documentation on folder attributes for deeper insights and examples that can revolutionize your projects.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON here.
