In the field of molecular modeling and design, organizing and analyzing complex data efficiently is key. SAMSON’s Node Specification Language (NSL) provides a powerful way to manage and query structures. If you’ve ever struggled to filter molecular datasets in a streamlined way, understanding folder attributes defined within NSL can make your work significantly easier.
Folders represent a logical grouping of nodes in SAMSON, such as molecular or atomic structures. These folders come with their own set of attributes that allow users to query and manipulate data effectively using the folder attribute space (short name: f). By understanding how to use these attributes, you can quickly find nodes of interest without manually sifting through data.
Key Folder Attributes to Simplify Your Workflow
Folder attributes allow you to match and query folders based on a variety of properties. These include general inherited attributes as well as folder-specific ones. Here are some examples:
1. General Folder Attributes
- Visibility: The
visible(f.v) andvisibilityFlag(f.vf) attributes allow you to determine whether a folder or its components are visible in the viewport. For example:f.v true: Matches folders that are visible.not fo.v: Matches folders that are not visible.
- Selection: Use
selected(f.selected) orselectionFlag(f.sf) to identify whether folders or components are selected.f.selected: Matches all selected folders.not fo.selected: Matches unselected folders.
2. Folder-Specific Attributes
- Number of Atoms: The
numberOfAtoms(f.nat) attribute lets you query folders based on atom count. Examples include:f.nat > 100: Matches folders with more than 100 atoms.f.nat 100:200: Matches folders with 100 to 200 atoms.
- Partial Charge: With
partialCharge(f.pc), you can retrieve folders based on total partial charges. For example:f.pc > 1.5: Matches folders with partial charges above 1.5.f.pc 1.5:2.0: Matches folders with partial charges in the range 1.5 to 2.0.
- Number of Molecules: Use
f.nm(short fornumberOfMolecules) to query based on how many individual molecules a folder contains. For instance:f.nm < 3: Matches folders containing fewer than 3 molecules.f.nm 2:4: Matches folders with 2 to 4 molecules.
Other attributes, such as numberOfCarbons (f.nC), numberOfSegments (f.ns), or formalCharge (f.fc), can also be used in similar ways to adjust your queries based on specific properties of interest.
Practical Example: Filtering by Atom Count and Visibility
Suppose you need to analyze folders that contain between 100 and 200 atoms AND are visible in your model. To do this, you would use the following query:
|
1 |
f.nat 100:200 and f.v true |
This reduces clutter by showing only the folders that match your criteria. Similarly, you can combine multiple conditions to tailor your searches.
Why It Matters
For molecular modelers working with intricate structures or extensive datasets, querying folders efficiently can save hours of manual effort. NSL’s folder attributes provide a robust toolkit to help you refine your focus and work in a highly targeted way. Understanding and leveraging these attributes empowers you to extract the specific insights you need without overwhelming you with unnecessary information.
To see all the details and examples of folder attributes in SAMSON, visit the official documentation page: Folder Attributes Documentation.
SAMSON and all SAMSON Extensions are free for non-commercial use. Download SAMSON here: https://www.samson-connect.net
