From a crowded structure to useful atoms: a practical NSL workflow

A molecular structure can contain thousands of atoms, but many modeling tasks begin with a much smaller question: which atoms are relevant to this particular inspection? Finding possible hydrogen-bond partners, focusing on a protein backbone, or separating water oxygens from the rest of a model can be tedious if you have to inspect atoms one by one.

SAMSON’s Node Specification Language (NSL) lets you describe atoms by their attributes and combine those conditions into concise filters. The key idea is to start with a chemical question, translate it into one or more attributes, and narrow the result only as much as the task requires.

Start with the interaction role

For a first pass at hydrogen-bond-related atoms, use the donor and acceptor attributes:

  • a.hbd matches atoms marked as hydrogen-bond donors.
  • a.hba matches atoms marked as hydrogen-bond acceptors.
  • a.dbh matches donor-linked hydrogens.

These are useful ways to find atoms by their assigned role. They do not, by themselves, establish that two atoms form a hydrogen bond: the attributes identify donors, acceptors, or donor-borne hydrogens, not a complete interaction geometry. Treat the results as candidates to inspect in the context of the structure.

You can combine a role with another condition. For example, a.hba and a.heavy asks for acceptor atoms that are also heavy atoms. The a.heavy attribute matches non-hydrogen atoms. Likewise, a.hbd and a.heavy narrows donor matches to heavy atoms. Combining conditions is especially helpful when a broad search returns more atoms than you need.

Keep the search in structural context

A chemically relevant atom is often meaningful because of where it sits. If you are examining a protein backbone, a.aabb matches heavy atoms that belong to an amino-acid backbone. For a nucleic-acid backbone, use a.nabb, which likewise matches backbone heavy atoms. These filters help focus an inspection without having to manually identify each backbone atom.

Residue and chain attributes can narrow the result further. For example, a.resi 42 selects atoms in residue sequence number 42, while a.c A selects atoms from chain A. You can combine these with a chemical condition, such as a.hba and a.c A, to focus on acceptors in one chain. To inspect a range of residues, the documented range syntax is a.resi 40:50.

Remember that these filters answer different questions: a.resi refers to residue sequence numbers, whereas a.c refers to chain labels. Using both can make a search more specific when a structure contains repeated residue numbering across chains.

Handle waters and hydrogens deliberately

Water can be easy to overlook when you are scanning a crowded binding site. To find oxygen atoms carrying the water flag, use a.s O and a.w. The documentation also gives a.s O in wat as a compact way to match oxygen atoms in water. This can help you inspect water-associated atoms separately from other oxygens.

If your question concerns hydrogens, distinguish the general hydrogen element from the hydrogen-role attributes. For example, a.s H matches hydrogen atoms by element symbol; a.hp identifies polar hydrogens, and a.hnp identifies non-polar hydrogens. Polar hydrogens are described as hydrogens attached to atoms with significantly larger electronegativity, including N, O, S, F, and Cl. Choosing the attribute that matches your question avoids treating all hydrogens as equivalent.

A simple way to build a reliable query

  1. State the target. Are you looking for an element, a chemical role, a backbone atom, a residue, or a combination?
  2. Choose the matching attribute. For example, use a.s O for oxygen, a.hba for acceptors, or a.aabb for amino-acid backbone heavy atoms.
  3. Add context one condition at a time. Combine conditions with and, then check whether the result is still useful for the question.
  4. Interpret the result carefully. A matching attribute is a filter, not a substitute for checking structural context. Some attributes also depend on prior assignment or computation: the documentation notes this for hybridization and geometry.

This approach keeps selection purposeful: first identify the chemical feature, then add just enough structural context to make the result manageable. For the full list of atom attributes, syntax examples, and possible values, see the SAMSON atom-attribute reference.

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

Comments are closed.