A molecular model can contain many molecules, from small ligands to long chains and multi-component assemblies. When you need to focus on a particular kind of molecule, scanning names or clicking through the structure one item at a time can become tedious. SAMSON’s Node Specification Language (NSL) lets you search molecule nodes by structural properties, so you can narrow the field using counts and charge rather than relying only on labels.
Start with the shape of the problem
Every expression below uses the mol attribute space, which matches molecule nodes. A practical first step is to describe the kind of structure you are looking for: a molecule with a certain number of chains, a residue count in a chosen range, or a size below a threshold.
mol.nc < 3finds molecules with fewer than three chains.mol.nr > 100finds molecules with more than 100 residues.mol.nr 100:120finds molecules with residue counts between 100 and 120.mol.nat < 1000finds molecules with fewer than 1,000 atoms.
These filters answer different questions. Chain count can help distinguish a single-chain molecule from a multi-chain assembly. Residue count is useful when you are looking for structures of a particular biological scale. Atom count gives a broader measure of size. Using the appropriate measure avoids treating “large” as though it had only one meaning.
Use counts to narrow the search
If a model contains both macromolecules and smaller components, atom and residue counts can help separate candidates. For example, mol.nr 100:120 is a specific way to look for molecules in a residue-count interval, while mol.nat < 1000 selects by atom count. The documentation also provides counts for carbon, hydrogen, nitrogen, oxygen, sulfur, coarse-grained atoms, and structural groups. Examples include mol.nC 10:20 for a carbon-count range and mol.nO < 10 for fewer than ten oxygen atoms.
These composition attributes can be useful when a molecule’s name is uninformative or inconsistent. They let you express a concrete structural clue as a filter. Keep in mind that an element count is a count, not a chemical identity: by itself, it does not tell you which atoms are bonded together or what the molecule does.
Bring charge into the picture
Charge attributes offer another way to distinguish molecules. mol.fc > 1 filters by formal charge, while mol.pc > 1.5 filters by partial charge. The documentation lists formal charge as an integer-valued attribute and partial charge as a floating-point attribute. This distinction matters when choosing a threshold: use the attribute that corresponds to the kind of charge information you want to inspect.
A simple workflow for a busy structure
- Choose a structural clue. Decide whether chain count, residue count, atom count, composition, or charge is most relevant.
- Write a narrow, readable expression. Use the short forms, such as
mol.nc,mol.nr, andmol.nat, or their longer attribute names. - Adjust the threshold or range. If the result is too broad or too narrow, change the count or interval to better match the structures you need.
- Check what the attribute measures. A residue count, atom count, and chain count describe different aspects of a molecule; choose deliberately.
NSL also exposes molecule properties inherited from other attribute spaces, including visibility, selection, and name. For example, mol.v refers to visibility, and mol.n "A" matches a name. These can help when the task is to find a named molecule or distinguish visible from hidden nodes, while structural counts are often more helpful when names alone do not identify the target.
The examples here are individual expressions drawn from the molecule attribute reference. To explore the complete set of molecule attributes and their available forms, see the SAMSON molecule attributes documentation.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
