When modeling complex molecular systems, one common challenge is to quickly identify specific molecular groups within massive structures. Whether you’re searching for fragments inside a large protein-ligand complex, a polymer, or a supramolecular assembly, being able to filter by atom types and counts can drastically speed up your workflow.
If you are working with SAMSON, the integrative molecular design platform, there’s a flexible way to do this using the Node Specification Language (NSL). In this post, we’ll explore how structural group attributes—especially those related to atom counts—can help you filter and isolate only the parts of a system you want to focus on.
Why Atom-Based Filtering Matters
Imagine you’re analyzing a dataset with hundreds of ligands or molecular motifs. You’re only interested in groups containing more than 10 carbon atoms and less than 5 sulfur atoms. Manually inspecting each group is simply not feasible.
This is where structural group attributes come into play—particularly numberOfAtoms, numberOfCarbons, numberOfHydrogens, numberOfNitrogens, etc. These attributes can be used in NSL to express concise yet powerful queries in SAMSON.
Examples of NSL Queries that Target Atom Counts
The structural group attribute space uses the short name sg. Here are a few practical examples:
sg.nC > 10– Find all structural groups that contain more than ten carbon atoms.sg.nH 20:30– Retrieve groups that contain between 20 and 30 hydrogen atoms.sg.nS < 5– Match groups with fewer than five sulfur atoms.sg.nat > 100– Filter for structural groups with over 100 atoms in total.sg.nO 10:15– Locate groups with 10 to 15 oxygen atoms.
Searching by Chemical Composition
Each of the following attributes can be used for filtering structural groups by their content:
sg.nat– Total number of atomssg.nC– Number of carbon atomssg.nH– Number of hydrogen atomssg.nN– Number of nitrogen atomssg.nO– Number of oxygen atomssg.nS– Number of sulfur atomssg.ncga– Number of coarse-grained atoms
Just type your query into SAMSON’s search bar to narrow down the nodes that meet your criteria. You can also combine conditions for more granularity, such as:
sg.nC > 10 and sg.nO < 3
Who Benefits from This?
If you’re doing:
- Ligand screening
- Coarse-graining or atomistic validation
- Fragment-based drug discovery
- Data cleanup or quality checks in molecular systems
…then this feature is a small but powerful addition to your toolkit.
Input Formats and Flexibility
All the atom count attributes accept integer values. You can use common formats like a single number (e.g. sg.nN 2), a range (e.g. sg.nN 2:5), or inequality operators (e.g. sg.nC >= 12).
Wrapping Up
Clear, focused queries can make your modeling work significantly more productive. Next time you’re working with large systems in SAMSON, remember that just a few lines of NSL can isolate exactly the groups you want to explore.
To learn more about structural group attributes and NSL, check out the official documentation page: https://documentation.samson-connect.net/users/latest/nsl/structuralGroup/.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
