Quickly Find Structural Groups by Atom Count in Your Models

When building or analyzing large molecular systems, it can be a challenge to identify specific structural groups of interest — especially when dealing with hundreds or even thousands of groups. What if you want to isolate only those groups with a specific size? Or quickly flag ones that are unusually large? This is where the numberOfAtoms attribute in SAMSON’s Node Specification Language (NSL) becomes especially useful.

Whether you’re working with protein-ligand complexes, complex polymers, or custom coarse-grained models, being able to search based on the size of structural groups gives you a flexible and efficient way to filter model components for visualization, analysis, or export.

What is numberOfAtoms?

Structural groups in SAMSON are node types that group multiple atoms together. The numberOfAtoms attribute — or, in short, sg.nat — allows you to query these nodes based on how many atoms they contain.

Here are some practical queries you can use directly in the NSL box:

  • sg.nat > 100: highlights all structural groups with more than 100 atoms
  • sg.nat 100:200: selects structural groups that have between 100 and 200 atoms
  • sg.nat < 10: helps you find very small structural groups (which could be isolated fragments or small ligands)

Why this matters

Imagine loading a massive structure such as a full viral capsid or a combination of proteins and nucleic acids. You may want to ignore smaller ions or water molecules, or zoom in on only the largest structural domains. Instead of doing this manually, you can now write just one line in the Search box and instantly visualize only what matters to your current task.

Bonus: Combine with Other Filters

You can also combine numberOfAtoms with other structural group attributes for more refined control. For example:

  • sg.nat > 100 and sg.nC > 10: find groups with more than 100 atoms and more than 10 carbon atoms
  • sg.nat 50:100 and not sg.h: show groups between 50 and 100 atoms that are not hidden

This kind of filtering can be incredibly helpful when working on tasks like:

  • Functional annotation of large molecular systems
  • Focusing on the ‘active’ part of a hybrid material
  • Preparing publication visuals showing only important substructures

Learn More

SAMSON makes this process lightweight thanks to its NSL engine, which dynamically highlights your selection even as you type it. No preprocessing or scripting is required. You can read more details in the original documentation page on numberOfAtoms.

Click here to explore the full documentation on structural group attributes.

SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at www.samson-connect.net.

Comments are closed.