A Faster Way to Find the Molecule You Mean

Large molecular projects can become difficult to navigate for a simple reason: the structure you need is somewhere in the scene, but names alone don’t tell you whether it has the right size, composition, or organization. In SAMSON, the Node Specification Language (NSL) lets you search molecule nodes by attributes such as atom counts, chain counts, residue counts, and charge. That turns a vague browsing task into a set of specific questions.

The key is to choose an attribute that describes the kind of difference you care about. The molecule attribute space uses the prefix mol. For example, mol.nr > 100 matches molecules with more than 100 residues, while mol.nc < 3 matches molecules with fewer than three chains. These are molecule-level filters: they describe the molecule node, rather than asking about an individual atom or residue.

Start with structure size

If a scene contains molecules of very different sizes, atom and residue counts are useful first checks. The inherited numberOfAtoms attribute has the short name nat, so mol.nat < 1000 selects molecules below that atom-count threshold. To look within a range, the documented form is mol.nat 100:200. Residue counts use nr; for example, mol.nr 100:120 matches molecules with between 100 and 120 residues.

These measurements answer different questions. Atom count describes how many atoms the molecule contains; residue count describes its number of residues. A molecule that is large by one measure is not necessarily large by the other, so pick the attribute that corresponds to what you are trying to compare.

Use organization when size isn’t enough

Two molecules can have similar atom counts but differ in how they are organized. NSL provides separate counts for chains, segments, and structural groups:

  • mol.nc 2:4 searches for molecules with between two and four chains.
  • mol.ns 2:4 searches for molecules with between two and four segments.
  • mol.nsg 10:12 searches for molecules with between 10 and 12 structural groups.

Keeping these attributes distinct can make a search more meaningful. A chain count is not a residue count, and a segment count is not a structural-group count. If you are unsure which description fits your structure, try the relevant count as a separate query and compare the results.

Check composition and charge

For a quick composition-based search, use the inherited element-count attributes. For example, mol.nC < 10 matches molecules with fewer than 10 carbons, and mol.nO 10:20 matches molecules with between 10 and 20 oxygens. The available counts also include hydrogen, nitrogen, sulfur, and coarse-grained atoms. For formal charge, mol.fc > 1 is an example of a numeric comparison; for partial charge, mol.pc > 1.5 uses a floating-point value.

A practical way to narrow down a crowded project is to begin with the property that best captures your goal, then refine the search using another relevant attribute. For instance, if you are looking for a molecule of a certain scale, begin with atom or residue count. If organization matters, inspect chain or segment count instead. If composition is the deciding factor, use an element count. This approach helps you avoid relying on a molecule’s name when its measurable properties are more informative.

NSL also includes inherited molecule attributes for visibility, selection, and naming. For example, mol.v refers to visibility, and mol.n "A" is a name-based expression. These can be useful when your task is about locating or managing nodes rather than comparing molecular composition.

For the complete attribute list and additional examples, see the SAMSON molecule attributes reference.

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

Comments are closed.