When a structure collection grows, finding the molecule you need can turn into a repetitive task: open a candidate, check its size or composition, close it, and move on. In SAMSON, the Node Specification Language (NSL) offers a more direct first step: describe molecules using attributes such as atom counts, residue counts, chain counts, and charge, then use those criteria to find matching molecule nodes.
This is especially useful when you know the rough shape of the answer but not the molecule’s name. Instead of relying on memory or visual inspection, you can start with a measurable property. The examples below use the mol attribute space, which matches molecule nodes.
Start with the kind of size you actually mean
“Large molecule” can mean several different things. NSL exposes separate counts, so choose the one that reflects your question:
mol.natcounts atoms. For example,mol.nat < 1000matches molecules with fewer than 1,000 atoms, whilemol.nat 100:200matches the range from 100 to 200.mol.nrcounts residues. Usemol.nr > 100to find molecules with more than 100 residues, ormol.nr 100:120for a narrower interval.mol.nccounts chains. For example,mol.nc < 3identifies molecules with fewer than three chains.mol.nscounts segments, andmol.nsgcounts structural groups.
These measures are not interchangeable. A molecule’s atom count answers a different question from its residue or chain count. Choosing the right attribute can make a search more useful before you start examining structural details.
Use composition to narrow the field
When the atoms themselves matter, the inherited structural-group attributes let you search by elemental counts. For example, mol.nC < 10 matches molecules with fewer than 10 carbons, and mol.nO 10:20 matches those with 10 to 20 oxygens. Similar attributes are available for hydrogen, nitrogen, and sulfur: mol.nH, mol.nN, and mol.nS.
These counts are useful for a quick composition-based screen—for instance, when you want to distinguish a small molecule from a larger structure or check whether a collection contains candidates with a particular elemental makeup. They describe counts, not a chemical substructure or the locations of atoms, so treat them as a first filter rather than a complete chemical description.
Check charge when it is part of the question
Two additional attributes cover charge. mol.fc is formal charge, and mol.pc is partial charge. The documentation shows integer comparisons and ranges for formal charge, such as mol.fc > 1 and mol.fc 6:8; partial charge uses floating-point values, as in mol.pc > 1.5 or mol.pc 1.5:2.0.
Keep the distinction in mind: formal charge is represented with integers here, while partial charge is represented with decimal values. Selecting the matching attribute avoids asking a query to express a different kind of charge information.
A practical way to build a search
- Write down the property you already know: atom count, residue count, chain count, elemental count, or charge.
- Choose the corresponding short attribute name, such as
nat,nr,nc,nC, orfc. - Use a comparison for a one-sided cutoff, such as
mol.nr > 100, or a range when you know both bounds, such asmol.nc 2:4. - Review the matches, then refine your criteria if the result is still too broad.
NSL also provides molecule attributes for names, visibility, selection, and material-related properties. Those can help describe the state or identity of a molecule node, while the numerical attributes above are often the clearest starting point for structural triage.
The useful habit is simple: translate an informal description—“a molecule with roughly this many residues” or “one with a modest oxygen count”—into the specific attribute that measures it. That makes the search easier to repeat and less dependent on manually checking every candidate.
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.
