Stop hunting residue by residue: filter side chains by composition and charge

When a molecular model contains many residues, finding side chains with a particular size, elemental makeup, or charge can become a tedious visual scan. A name alone may not answer the question: you may need to narrow the model to groups with fewer than a certain number of carbons, or inspect side chains whose recorded partial charge falls in a range.

SAMSON’s Node Specification Language (NSL) lets you describe these criteria as expressions. The useful starting point is the sideChain attribute space: it matches side-chain nodes, and its examples use the sc prefix. That scope matters. It keeps a side-chain query focused on side chains rather than asking you to reason about every kind of node in the model.

Start with a question you can express

For composition-based filtering, the side-chain attributes include counts for atoms, carbons, hydrogens, nitrogens, oxygens, sulfurs, and coarse-grained atoms. These attributes accept integer comparisons and ranges. For example, sc.nC < 10 expresses a carbon-count threshold, while sc.nC 10:20 expresses a range. You can use the corresponding attributes sc.nH, sc.nN, sc.nO, and sc.nS when a particular element count is relevant.

Counts can help turn a vague visual task into a repeatable criterion. Instead of manually checking each side chain for size, write down the property you care about and use the matching count attribute. For a broader size check, the total atom count is available as sc.nat; the documented examples include sc.nat < 1000 and sc.nat 100:200. The numbers here illustrate the syntax, not recommended scientific cutoffs—choose values that suit your model and question.

Keep charge measures distinct

The reference lists two charge-related attributes: formalCharge (fc) and partialCharge (pc). They are separate fields, so use the one that matches the quantity you intend to inspect. The documented examples show integer comparisons and ranges for formal charge, such as sc.fc > 1 and sc.fc 6:8, and floating-point comparisons and ranges for partial charge, such as sc.pc > 1.5 and sc.pc 1.5:2.0.

This distinction is practical: a query is only useful if its attribute corresponds to the property behind your question. Check whether you mean formal charge or partial charge before interpreting the results. NSL exposes both, but the attribute names should not be treated as interchangeable.

Use names and display state when useful

Side chains also inherit general node attributes. You can query a quoted name, as in sc.n "A" or sc.n "L*", and inspect boolean properties such as visibility and selection. Examples include sc.v for visible, not sc.v for not visible, sc.selected, and not sc.selected. The attribute table also documents sc.h for hidden and sc.sf or sc.vf for selection and visibility flags.

One small naming detail can prevent confusion: the side-chain attribute table lists selected without a short name, and explicitly notes that it does not use the short name s. The examples use the full expression sc.selected. When in doubt, follow the documented form rather than guessing a shortened spelling.

A simple workflow is to identify the molecular feature you need, choose the matching attribute, and write a focused expression using the documented comparison or range syntax. Composition, charge, name, visibility, and selection criteria each answer different questions; keeping them separate makes it easier to understand what a query is asking. For the complete attribute list and additional details, see the SAMSON side-chain attribute reference.

Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON.

Comments are closed.