A crowded molecular scene can make a simple question surprisingly difficult: which object is the protein, chain, or molecular assembly you meant to inspect? Names are not always enough, especially when several molecules have similar or generic labels. In SAMSON, the molecule attributes in the Node Specification Language (NSL) let you search by structural counts instead—so you can narrow candidates by their number of residues, chains, segments, or structural groups.
The useful shift is to think of a molecule as having a structural footprint. A residue count can help distinguish a large protein from a small ligand; a chain count can separate a single-chain object from a multi-chain assembly. These are molecule-level properties, which makes them practical when you first need to identify an object rather than inspect every atom individually.
Start with the count that answers your question
For a quick size-based search, use mol.nr, the short name for molecule.numberOfResidues. For example:
mol.nr > 100matches molecules with more than 100 residues.mol.nr 100:120matches molecules with a residue count between 100 and 120.
This is a useful first pass when a scene contains both macromolecules and smaller molecular objects. It does not identify a molecule by biological role, however: the count is a structural criterion, not a label such as “receptor” or “ligand.” Treat it as a way to reduce the candidates, then use the context of your project to decide which result you need.
If the distinction you care about is assembly organization, try mol.nc, the short name for molecule.numberOfChains:
mol.nc < 3matches molecules with fewer than three chains.mol.nc 2:4matches molecules with between two and four chains.
Chain count and residue count answer different questions. A high residue count suggests a larger residue-based structure; chain count describes how many chains the molecule contains. Checking both concepts separately can help you reason about why two candidates that look similarly large may represent different kinds of assemblies.
Use other counts to refine your mental picture
When residue or chain count is not the right measure, NSL also exposes mol.ns for the number of segments and mol.nsg for the number of structural groups. Examples include mol.ns > 2 and mol.nsg > 10. These attributes let you ask more targeted structural questions without relying on the molecule’s name.
For atom-level composition totals, the molecule attribute space also inherits counts such as mol.nat (atoms), mol.nC (carbons), mol.nH (hydrogens), mol.nN (nitrogens), and mol.nO (oxygens). For example, mol.nat < 1000 searches for molecules with fewer than 1,000 atoms, while mol.nO 10:20 searches by oxygen count. These are distinct from residue and chain counts: choose the attribute that corresponds to the question you are actually asking.
Readable queries, compact queries
Short names are convenient when you already know the attribute, but the full names can make a query easier to understand later. For example, molecule.numberOfResidues > 100 is the full form of mol.nr > 100. The documentation lists both forms for several molecule attributes. A practical habit is to use the full form while drafting or sharing a query, then switch to the short form when compactness matters.
One important detail: these attributes match molecule nodes. They describe the molecule as a whole, rather than asking whether an individual atom or residue has a particular property. That makes them a sensible starting point for finding the right molecular object in a complex scene.
For the complete attribute reference and additional examples, see the SAMSON molecule attributes documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
