When a molecular structure contains many molecules, finding the one you need can feel like searching a crowded parts drawer. You may be looking for a small ligand, a molecule with a particular charge, or a structure with a manageable number of residues. Scanning names alone often is not enough: names can be uninformative, while size and composition offer useful clues.
SAMSON’s Node Specification Language (NSL) lets you describe those clues as filters. The molecule attribute space, abbreviated mol, matches molecule nodes. Its attributes include counts of atoms, residues, chains, segments, and structural groups, as well as elemental counts and charge. That makes it useful for narrowing a large structure to a more workable set before inspecting candidates in detail.
Start with the scale of the structure
If you need to separate smaller molecules from large assemblies, filter by atom count. For example, mol.nat < 1000 matches molecules with fewer than 1,000 atoms. If you are interested in a bounded size range, use mol.nat 100:200. The same kind of numeric comparison works for other counts: mol.nr 100:120 finds molecules with between 100 and 120 residues, while mol.nc < 3 finds molecules with fewer than three chains.
These counts answer different questions. Atom count is a broad measure of structural size; residue count is useful when thinking in terms of protein or polymer structure; chain count helps distinguish single-chain molecules from multi-chain ones. Choosing the count that matches your task can make a filter more informative than relying on a single general measure.
Use composition as a clue
Element counts can help identify molecules with a particular chemical makeup or flag candidates for closer inspection. For example, mol.nC < 10 filters for fewer than ten carbon atoms, and mol.nO 10:20 selects molecules with an oxygen count between 10 and 20. The available counts include carbon, hydrogen, nitrogen, oxygen, and sulfur.
Charge can provide another useful screen. Use mol.fc > 1 to match molecules with formal charge greater than 1, or mol.pc 1.5:2.0 to filter by partial charge in the specified range. Formal and partial charge are distinct attributes, so choose the one that corresponds to the property you want to examine.
Turn a vague search into a repeatable one
A practical first pass is to translate your question into one measurable property: “fewer than 1,000 atoms,” “between 100 and 120 residues,” or “more than 1 formal charge.” Try that predicate, inspect the resulting candidates, and refine the criterion if needed. This keeps the search understandable: each expression states exactly which structural property is being used.
Short names make repeated filters quicker to type. For example, mol.numberOfResidues 100:120 can be written as mol.nr 100:120; mol.numberOfChains < 3 becomes mol.nc < 3. Both forms refer to the same attributes. If you are unsure what a short name means, the full attribute name is a useful reminder.
Not every helpful molecule attribute describes chemistry or size. You can also filter by name, visibility, or selection state—for instance, mol.n "A" checks a quoted name, and not mol.selected matches molecules that are not selected. These inherited node attributes can be useful when organizing or reviewing a scene, alongside the molecule-specific counts.
The key idea is to use NSL as a way to make a search explicit. Rather than relying only on visual inspection, state the property you care about, use a comparison or range, and inspect the molecules that match. 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.
