Find the side chains that matter—without losing track of the chemistry

When a molecular model contains many residues, finding the side chains relevant to a question can take longer than answering it. A visual scan may miss a candidate, while searching by residue name alone may not distinguish groups with different compositions or charges. SAMSON’s Node Specification Language (NSL) lets you describe side chains using their names, atom counts, charges, and display or selection state.

The practical starting point is the sideChain attribute space, abbreviated sc. Its expressions match side-chain nodes. That scope matters: it helps keep a query focused on side chains rather than applying the same criteria to every kind of node in a molecular scene.

Start with the question, then choose an attribute

If you know the name or want to inspect a name pattern, use the inherited name attribute. For example, sc.n "A" searches by the name A, while sc.n "L*" is an example of a quoted name expression from the reference. Keeping the value in quotes is important for string-based searches.

If the useful distinction is chemical composition, use the atom-count attributes. The short names make repeated queries compact:

  • sc.nC < 10 checks for fewer than 10 carbons.
  • sc.nO < 10 checks the oxygen count against a numeric threshold.
  • sc.nat 100:200 specifies a range for the total number of atoms.

Related counts are available for hydrogen (nH), nitrogen (nN), sulfur (nS), and coarse-grained atoms (ncga). These attributes are inherited from the structural-group attribute space, so they describe group-level counts rather than the identity of a particular atom.

Keep formal and partial charge distinct

Charge is another useful way to narrow a search, but the two charge attributes are not interchangeable. formalCharge (fc) takes integer values; partialCharge (pc) takes floating-point values. The reference gives sc.fc > 1 and sc.fc 6:8 as formal-charge examples, and sc.pc > 1.5 and sc.pc 1.5:2.0 as partial-charge examples. Choose the attribute that matches the property you intend to examine, rather than treating a partial charge as a formal one.

A useful habit is to make each test answer one clear question. First inspect the name or composition you care about; then use a charge attribute if charge is relevant. This makes it easier to understand why a side chain matches, and easier to adjust a threshold or range when the result is broader or narrower than expected.

Use visibility and selection state carefully

Side chains also inherit node attributes for visibility and selection. For example, sc.v tests visibility, and sc.selected tests whether a side chain is selected. The selection attribute has no short name in this attribute space, so write it out rather than trying to abbreviate it. The reference also lists sc.h for hidden state and sc.sf and sc.vf for selection and visibility flags. These are different attributes from selected and visible; use the one that expresses the state you mean.

To get started, copy one expression that matches your immediate question, change its value or comparison, and check the results before adding more criteria. The full reference lists every side-chain attribute and its accepted value type: Side chain attributes in the SAMSON NSL documentation.

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

Comments are closed.