Working with large molecular systems often means navigating through complex structures and disorganized data. Whether you’re analyzing biomolecules, designing nanostructures, or handling materials simulations, you’ve probably faced this challenge: how do I quickly locate specific models or folders based on their structural content?
If you use the SAMSON platform, there’s a helpful feature in the Node Specification Language (NSL) that allows you to filter folders based on the number of atoms, hydrogens, carbons, and many other atom-specific criteria. This saves time and avoids the need to open and inspect each folder or model manually.
Use case: Finding models with specific atom counts
Imagine you’re looking for all the folders in your SAMSON document that contain models with fewer than 1,000 atoms. Or perhaps you’re only interested in models that have between 10 and 20 hydrogen atoms. The folder attribute space in SAMSON makes this possible with concise commands using specific short-name attributes.
Examples of useful filters
Below are a few examples of NSL queries that help you quickly retrieve relevant folders:
f.nat < 1000— folders with fewer than 1,000 atoms.f.nH 10:20— folders with 10 to 20 hydrogen atoms.f.nC < 10— folders with fewer than 10 carbon atoms.f.nO 5— folders with exactly 5 oxygen atoms.
Supported attributes for atom-based searches
The following short names are available for filtering based on specific types of atoms:
f.nat— number of all atomsf.nC— number of carbon atomsf.nH— number of hydrogen atomsf.nO— number of oxygen atomsf.nN— number of nitrogen atomsf.nS— number of sulfur atomsf.ncga— number of coarse-grained atoms
This enables a powerful way to filter and focus only on models relevant to your task. For example, if you’re working on structures with low carbon content, a quick f.nC < 10 immediately shows you what’s available.
How it works in practice
To try this out, open SAMSON and use the search bar (based on the NSL) and type one of the attribute filters above. The filtered folders will automatically be listed and highlighted based on your query. You can combine multiple conditions too, like:
|
1 |
f.nH 10:20 and f.nO > 5 |
This filters for folders with 10 to 20 hydrogen atoms and more than 5 oxygen atoms.
This approach helps streamline workflows, especially when working with numerous molecular models stored in folder nodes. It reduces manual work and lets you concentrate on meaningful design and analysis workflows.
To learn more about all the folder attributes available in the NSL, including how to combine and customize your queries, visit the official SAMSON documentation.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.
