Find the right molecular segment without losing time in the structure

A large molecular structure can be difficult to inspect one piece at a time. Maybe you need to locate long segments, spot a small segment with an unusual composition, or check which segments are hidden. Clicking through the structure can turn a focused question into a slow search.

SAMSON’s Node Specification Language (NSL) lets you describe the segments you want to match using attributes such as residue count, atom count, elemental composition, charge, name, and visibility. The segment attribute space uses the short prefix s. The examples below show how to turn common inspection questions into explicit searches.

Start with size

If you are looking for segments longer than a chosen residue count, use s.nr, the short name for numberOfResidues:

s.nr > 100

This matches segments with more than 100 residues. To look for segments in a particular size band, use a range:

s.nr 100:120

Atom count can help answer a different question: how large is the segment in terms of its atoms? For example, s.nat < 1000 matches segments with fewer than 1,000 atoms. Residue count and atom count describe different measures, so choose the one that fits the question you are trying to answer.

Use composition to narrow the search

Segment attributes include inherited counts for several elements. For example, s.nC refers to the number of carbons, and s.nO to the number of oxygens. These can help you find segments with a particular elemental profile:

  • s.nC < 10 — fewer than 10 carbon atoms.
  • s.nH 10:20 — between 10 and 20 hydrogen atoms.
  • s.nO < 10 — fewer than 10 oxygen atoms.

These are counts for the segment, not a description of a specific residue. If your question is about an individual residue rather than an entire segment, use the residue attribute space instead.

Check charge and naming

For charge-related checks, the inherited formalCharge attribute uses the short name fc, while partialCharge uses pc. For example, s.fc > 1 searches for segments with formal charge greater than 1, and s.pc 1.5:2.0 searches for segments whose partial charge falls in the specified range.

Names can also make a search easier to read. The attribute s.n takes a string in quotes; the documentation gives s.n "A" and s.n "L*" as examples. This is useful when you already know the segment name or have a naming pattern in mind.

Include visibility in your inspection

When a segment seems to be missing from the view, check its visibility-related attributes. The short name s.v refers to visible, and s.h refers to hidden. The expressions s.v and not s.v let you look for visible and non-visible segments respectively; s.h and not s.h provide the corresponding hidden-state check. This can help distinguish a segment that is absent from the current view from one that is simply hard to locate in a crowded structure.

A practical way to work

Start with one clear criterion, such as s.nr > 100 or s.nO < 10. Review the matches, then refine the search based on what you learn—for example, switch from residue count to atom count, or inspect charge instead of composition. Keeping each test focused makes it easier to understand why a segment matches and to adjust the criteria when your scientific question changes.

NSL also provides long attribute names, such as segment.numberOfResidues, alongside short forms such as s.nr. The long form can make a query easier to interpret later; the short form is convenient when entering expressions. Both forms are documented for the segment attributes covered here.

For the complete attribute list and additional examples, see the SAMSON segment attributes reference.

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

Comments are closed.