Find the Side Chains That Matter—Without Losing Time to Manual Selection

When a molecular model contains many residues, manually finding side chains with a particular charge or composition can become a tedious detour. Node Specification Language (NSL) offers a more systematic approach: describe the side chains you want by their attributes, then use the expression as a targeted filter.

The key is to start with the right attribute space. In SAMSON, sideChain (short name s) matches side-chain nodes. The examples below use the prefix sc, as shown in the reference. That prefix matters: it makes clear that the filter concerns side chains, rather than some other kind of node.

Start with the question you want to answer

A useful filter begins with a modeling question, not a long list of attributes. Are you looking for side chains with a certain formal charge? For larger side chains? For groups with a particular number of carbon or oxygen atoms? NSL provides attributes for these distinctions, so you can express the criteria directly.

For example, use sc.fc to refer to formal charge. The documentation shows both a comparison and a range:

  • sc.fc > 1 — formal charge greater than 1.
  • sc.fc 6:8 — a formal-charge range from 6 to 8.

Those values are examples of the syntax, not recommendations for a particular scientific selection. Choose a range that fits the question and the structures you are analyzing.

Use composition to narrow the search

Side-chain attributes inherited from the structuralGroup space include counts of atoms and of specific elements. The short names make these convenient to type:

  • sc.nat: number of atoms
  • sc.nC: number of carbons
  • sc.nH: number of hydrogens
  • sc.nN: number of nitrogens
  • sc.nO: number of oxygens
  • sc.nS: number of sulfurs

For example, sc.nC < 10 describes side chains with fewer than 10 carbons, while sc.nO 10:20 gives an example of an oxygen-count range. There are also attributes for total atom count (sc.nat) and coarse-grained atom count (sc.ncga). These measures answer different questions: an element count focuses on composition, while total atom count describes the group’s overall size.

Charge and naming are useful complementary clues

For partial charge, use sc.pc. It accepts floating-point values, with examples including sc.pc > 1.5 and sc.pc 1.5:2.0. Formal charge (sc.fc) and partial charge (sc.pc) are separate attributes, so use the one that matches the property you intend to examine.

If you already know a side-chain name or naming pattern, the inherited name attribute is another option. The reference examples are sc.n "A" and sc.n "L*". Keep the name in quotes, as shown. The wildcard-like character in the second example is part of the documented expression.

Don’t confuse filtering by properties with display state

The side-chain space also inherits node attributes such as visible, hidden, and selected. For instance, the documented expressions include sc.v, not sc.v, and sc.selected. These describe visibility or selection state; they are not chemical-composition criteria. One small syntax detail is worth remembering: although s is the side-chain namespace short name, selected has no short name in this space, so use sc.selected.

A practical workflow is to translate the question into one attribute at a time, check the documented value type, and then test a clear expression. This helps avoid mixing up integer counts, floating-point partial charge, quoted names, and true/false display attributes. Once the criteria are clear, you can use the relevant expressions to focus your selection and continue your analysis without relying solely on visual scanning.

For the complete attribute list and additional examples, see the SAMSON side-chain NSL reference.

Note: SAMSON and all SAMSON Extensions are free for non-commercial use. Get SAMSON at samson-connect.net.

Comments are closed.