When dealing with large datasets in molecular modeling projects, it’s not uncommon to feel overwhelmed by the sheer number of models. Sometimes, you’re only interested in molecules with a size above a certain threshold, or maybe you need to exclude massive structures to speed up simulations. Whatever your case might be, filtering models based on atom count can be a solid way to gain control and insight. SAMSON’s Node Specification Language (NSL) can help you do just that—fast and efficiently.
In this guide, we’ll show how to use the sm.nat attribute in NSL to filter structural models based on their atom count directly in SAMSON, giving you an immediate handle on your molecular workspace.
Why Atom Count Matters
Molecular size can influence everything from rendering speed to the feasibility of specific simulation algorithms. Say you’re building a dataset for training a neural network—filtering out giant molecules might be a necessity. Or maybe you’re only interested in small ligands while preparing docking inputs. Whatever your use case, a quick filter saves time.
Filtering Made Simple with sm.nat
The sm.nat attribute stands for “number of atoms” and can be used in NSL to select models with specific atom counts. It’s part of the structuralModel attribute space, which targets nodes in your SAMSON document that are structural models.
Basic Filters
Here are some examples of how you can use sm.nat in the Search Bar:
sm.nat > 100— Select all structural models with more than 100 atoms.sm.nat 50:150— Select models with atom counts between 50 and 150.
This filter updates in real-time. No scripts. No extra preprocessing. Just type and refine.
Combining Filters
Want to select visible models with more than 200 atoms? Combine attributes:
|
1 |
sm.nat > 200 and sm.v |
Maybe you’re only focused on unhidden models smaller than 300 atoms:
|
1 |
sm.nat < 300 and not sm.h |
This composability makes NSL a powerful tool for data curation and visualization, especially in environments with a large number of structural models.
Tips for Practical Use
• You can use NSL directly in SAMSON’s filter bar.
• Think of sm.nat like a query language: it’s precise, readable, and fast.
• It’s particularly useful when building pipelines or preparing input files for downstream modeling steps.
Conclusion
Whether you need to isolate small organic molecules for docking or filter out tiny fragments from a simulation dataset, sm.nat can help you save time and reduce clutter. The next time you’re working in SAMSON, give NSL filtering a try—it’s a small feature that offers big-time utility.
To explore other structural model attributes and get a deeper understanding of NSL, visit the official documentation page.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
