From a Crowded Structure to a Clear Atom Selection

If you have ever tried to inspect a protein structure and found that your selection includes too much—or leaves out atoms you expected—you have met a common molecular-modeling problem: the selection is only as useful as the criteria behind it. SAMSON’s Node Specification Language (NSL) lets you combine atom properties into explicit, reusable filters, so you can narrow a structure step by step instead of relying on a vague selection.

This guide focuses on a practical workflow: isolate a region of a structure, check which atoms it contains, and refine the selection for questions involving backbone atoms, alternate locations, waters, or hydrogen bonding.

Start with a region, then narrow it

Atom attributes use the atom attribute space, abbreviated a. A selection can combine criteria with and. For example, to select heavy atoms in chain A that belong to an amino-acid backbone, use:

a.c A and a.heavy and a.aabb

Each part answers a different question: a.c A restricts the selection to chain A, a.heavy excludes hydrogens, and a.aabb identifies heavy atoms belonging to an amino-acid backbone. Breaking a query into these pieces makes it easier to see why an atom is—or is not—in the result.

You can add a residue range to focus on a segment:

a.c A and a.resi 40:50 and a.heavy

Here, a.resi selects atoms in residues 40 through 50. To restrict the result further to oxygen and nitrogen atoms, add a.s O, N:

a.c A and a.resi 40:50 and a.heavy and a.s O, N

NSL also supports comparisons and lists of values. For instance, a.resi 40:50,100 selects residue IDs in the range 40–50 as well as ID 100. When a query becomes difficult to read, test its individual conditions separately, then combine them.

Inspect alternate locations and occupancy

Structures can contain atoms recorded at alternate locations. The a.alt attribute lets you filter by alternate-location character; for example, a.alt B selects atoms with alternate location B. You can also request more than one value: a.alt B, C.

Occupancy can help you identify atoms with low occupancy values:

a.oc < 0.3

These filters answer different questions. Alternate location identifies a recorded location label; occupancy selects using a numeric value. Combining them with a chain or residue range can help you focus your inspection:

a.c A and a.resi 40:50 and a.alt B

Use the query to find the atoms you want to review; the selection itself does not explain why a structure contains alternate locations or low occupancy.

Separate waters from nearby atoms

Water can be useful to include or exclude depending on the analysis. The water flag is available as a.w. To select oxygen atoms marked as water, use:

a.s O and a.w

The documentation also gives the equivalent expression a.s O in wat. If you are checking a local region, combine a water criterion with coordinate limits. For example, a.x 1nm:10nm filters by the x coordinate. Coordinate attributes accept length units, so use units explicitly when they make the intended scale clearer.

Find atoms relevant to hydrogen bonding

NSL provides attributes for hydrogen-bond acceptors and donors: a.hba and a.hbd. Donor-linked hydrogens can be selected with a.dbh. These attributes can help you identify atom categories to inspect in a structure. For example:

a.hba

or:

a.hbd

Keep the question precise: these expressions select atoms classified by the corresponding attribute; they do not, by themselves, describe a complete interaction geometry or prove that a hydrogen bond is present.

A small troubleshooting routine

  1. Begin with one simple criterion, such as a.c A or a.resi 40:50.

  2. Add one filter at a time, such as a.heavy, a.aabb, or a.w.

  3. If the result is unexpected, remove the newest condition and check whether the selection changes as expected.

  4. Use ranges, comma-separated values, and comparison operators only for the attributes that support them, and include units for quantities such as coordinates.

This stepwise approach turns a selection into a readable description of your intent. It also makes it easier to revisit the same criteria later, or to explain them to a collaborator.

For the complete list of atom attributes, aliases, values, and examples, see the SAMSON atom attributes reference.

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

Comments are closed.