When a molecular project contains several structural models, it can be hard to find the ones that deserve attention first. A model may be unexpectedly large, contain more chains than expected, or carry a charge that does not fit the rest of the set. Opening models one by one to check these details takes time—and makes simple quality-control questions feel tedious.
SAMSON’s Node Specification Language (NSL) offers a practical shortcut: describe a structural model by one of its attributes, then use the expression to match models with that property. Structural-model attributes use the sm prefix. The examples below show how to turn common checks into compact, reusable queries.
Find models by size
Atom count is a useful first pass when you want to identify unusually small or large structures. For example, sm.nat < 1000 matches structural models with fewer than 1,000 atoms. To focus on a particular size band, use a range: sm.nat 100:200.
This is useful when reviewing a mixed collection—for example, before separating small molecules from larger systems, or when looking for a model that may have been imported incompletely. The query does not explain why a model has that atom count; it narrows the list so you can inspect the relevant structures.
Check the organization of a model
Atom count alone does not tell you how a model is organized. The number of chains, molecules, residues, segments, and structural groups can help distinguish models with different contents. For instance, sm.nc < 3 matches models with fewer than three chains, while sm.nr > 100 matches models with more than 100 residues. If you are checking a narrower range, you can write sm.nc 2:4 or sm.nr 100:120.
These checks are especially handy when your expectation is structural rather than visual: “Does this model have several chains?” or “Is this structure in the residue-count range I anticipated?” They can help direct your attention without requiring you to count components manually.
Use composition and charge as clues
NSL also provides attributes for counts of carbon, hydrogen, nitrogen, oxygen, and sulfur atoms. For example, sm.nO < 10 checks for a low oxygen-atom count, and sm.nS 10:20 matches the documented range for sulfur atoms. Formal charge and partial charge are available too: sm.fc 6:8 checks a formal-charge range, and sm.pc 1.5:2.0 checks a partial-charge range.
Composition and charge are most useful as screening clues, not as a substitute for chemical interpretation. A match tells you that the model meets the attribute condition; it does not establish whether the model is chemically correct or suitable for a particular study. Use the results to identify candidates for closer inspection.
Keep queries readable
The longer attribute names are available as well. For example, structuralModel.numberOfAtoms < 1000 is the long form of sm.nat < 1000. Short forms are convenient for repeated work, while long forms can make saved expressions easier for collaborators to understand. A useful habit is to start with one clear condition, such as atom count or chain count, and then refine your search as needed.
Structural models also inherit general node attributes. You can check visibility with sm.v or selection state with sm.selected; the latter has no short name in this attribute space. These attributes answer different questions from the structural counts: they describe node state, rather than the composition or organization of the model.
In practice, these expressions turn a vague inspection task into a set of specific questions: How many atoms? How many chains? What charge range? Once you know which attribute addresses your question, the short NSL form makes the check easy to repeat across models.
For the complete attribute list and additional examples, see the SAMSON structural model attributes reference.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
