When a molecular scene contains many structural groups, inspecting them one by one can be a slow way to answer a simple question: which groups are unusually large, rich in a particular element, or carry a particular total charge? SAMSON’s Node Specification Language (NSL) lets you describe structural groups by their attributes, so you can narrow the search with concise expressions instead of relying only on visual inspection.
This is especially useful when the thing you want to locate is a group, rather than an individual atom. Structural-group attributes describe properties of the group as a whole: for example, its number of atoms, number of oxygen atoms, or total partial charge. In this attribute space, the short prefix is sg.
Start with size
If you are trying to identify large groups in a model, the numberOfAtoms attribute is a practical first filter. For example, sg.nat > 100 matches structural groups with more than 100 atoms. To look for groups in a narrower size band, use a range such as sg.nat 100:200.
The value of this approach is not just speed. A size-based query gives you a clear, repeatable criterion. If you are comparing structures or revisiting a model later, the expression records what “large” meant for that particular inspection.
Use composition to narrow the candidates
Once you have a size range in mind, elemental counts can help describe the groups you are interested in. NSL provides counts for carbon, hydrogen, nitrogen, oxygen, and sulfur atoms, as well as coarse-grained atoms. For example:
sg.nO < 10matches groups with fewer than 10 oxygen atoms.sg.nN 10:20matches groups with between 10 and 20 nitrogen atoms.sg.nC < 10matches groups with fewer than 10 carbon atoms.
These counts are useful for checking composition-related questions without manually counting atoms in each group. They are not, by themselves, a full chemical description: an element count does not tell you how atoms are connected or what role the group plays. Treat the query as a way to find candidates for closer examination, not as a substitute for chemical interpretation.
Check charge at the group level
For charge-related searches, distinguish between formalCharge and partialCharge. The structural-group formal charge is queried with sg.fc; the total partial charge uses sg.pc. For example, sg.fc 6:8 finds groups with formal charge in the specified range, while sg.pc 1.5:2.0 finds groups with total partial charge between 1.5 and 2.0.
That “total” matters: these attributes describe charge for a structural group, not the charge of a specific atom. If your question concerns a group’s overall charge, these are relevant attributes. If you need an atom-level value, consult the corresponding atom attributes instead.
Make the search easier to revisit
Structural groups also inherit useful node attributes. For example, sg.v refers to visibility, and sg.selected refers to selection state. The full names and short names are both available for many attributes; using the short forms keeps expressions compact, while the full names can be easier to read when you are learning or sharing a query.
A simple way to approach a crowded model is to ask one question at a time: how many atoms should the group contain? Which elemental count is relevant? Is total formal or partial charge part of the question? Then use the corresponding attribute and an example pattern as a starting point. Keeping each criterion explicit makes it easier to understand why a group matched and to adjust the search when the first results are too broad or too narrow.
For the complete list of inherited and structural-group-specific attributes, examples, and details, see the SAMSON structural group attributes reference.
Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.
