Find the Molecules You Need Without Counting by Hand

A crowded molecular model can make a simple task surprisingly slow: finding the molecules that are small enough to inspect, contain enough residues to be relevant, or have a particular chain structure. Counting atoms or residues one molecule at a time is tedious—and it is easy to miss a candidate. In SAMSON, the molecule attributes in Node Specification Language (NSL) let you search molecules by these properties instead.

The practical starting point is mol, the short name for the molecule attribute space. It matches molecule nodes. For example, mol.nat refers to the number of atoms in a molecule, while mol.nr refers to its number of residues. That distinction matters: a molecule can be large by atom count, by residue count, or both, and those measurements answer different questions.

Start with the pain you are trying to reduce

If the scene contains many large structures and you want to narrow the list to more manageable candidates, try mol.nat < 1000. This searches for molecules with fewer than 1,000 atoms. If instead you are looking for larger residue-based structures, mol.nr > 100 matches molecules with more than 100 residues.

These are useful first-pass filters, not verdicts about whether a molecule is scientifically useful. A count helps you reduce a list; it does not tell you whether a structure has the biological context or properties your project needs. Use the result to focus your next inspection, rather than treating a threshold as a quality score.

Use ranges when a threshold is too broad

A one-sided cutoff can return too many candidates. Range syntax gives you a more focused interval. For example, mol.nr 100:120 searches for molecules with between 100 and 120 residues. To focus on molecules with a modest number of chains, use mol.nc 2:4. The same pattern applies to other integer counts, such as mol.ns 1:3 for segments or mol.nsg 10:13 for structural groups.

A helpful habit is to begin with a broad, meaningful criterion, then tighten it only if the result set is still too large. This avoids choosing an arbitrary narrow range before you know how the structures in your project are distributed.

Choose an attribute that matches the question

  • mol.nat: number of atoms—useful when the overall atom count is the constraint.
  • mol.nr: number of residues—useful when you are comparing structures by residue count.
  • mol.nc: number of chains—useful when chain organization is part of your search.
  • mol.ns and mol.nsg: number of segments and structural groups, respectively, for searches based on those organization counts.
  • mol.nC, mol.nH, mol.nN, mol.nO, and mol.nS: counts of specific elements when composition is the question.

For example, mol.nC < 10 searches for molecules with fewer than 10 carbon atoms. Element counts can help narrow a search by composition, but they do not identify a chemical structure by themselves.

Make the search readable

Short names keep expressions compact, but the full attribute names can make a query easier to understand later: molecule.numberOfResidues 100:120 is the long form of mol.nr 100:120. When a query is part of a shared workflow, clarity is often more useful than saving a few characters. Keep a brief note about why you chose each threshold, especially when it reflects a project-specific constraint.

For more attributes and examples, see the molecule attribute reference.

Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.

Comments are closed.