How to Select Terminal Residues in SAMSON with NSL

When analyzing biomolecular structures, it’s often essential to identify and isolate terminal residues—those at the ends of polymer chains, such as the N-terminal or C-terminal amino acids in proteins. Whether you’re preparing a system for simulation, cleaning up a model, or visualizing structural features, having a quick and reliable method to select terminal residues can save significant time.

Fortunately, in SAMSON, the integrative molecular design platform, the Node Specification Language (NSL) makes this type of selection very accessible. This post will guide you through how to use the residue.terminal attribute to efficiently identify terminal residues and apply it to practical workflows.

What Are Terminal Residues?

Terminal residues are located at the start or end of a chain within a biomolecule. For proteins, these usually correspond to the amino (N-) and carboxyl (C-) termini. Accurately identifying them allows you to:

  • Check for chain completeness before running simulations
  • Prepare specialized terminus capping
  • Analyze degradation or modification patterns
  • Apply custom renderings or material properties

Using NSL to Select Terminal Residues

In NSL, terminal residues are identified using the residue.terminal attribute, with its short name being r.ter. This attribute returns true for terminal residues and false otherwise.

Here are a few examples of how you can target terminal residues:

  • residue.terminal (or r.ter): selects all terminal residues
  • not r.ter: selects non-terminal residues only
  • "CA" in r.ter: selects alpha carbon atoms in terminal residues

These expressions can be incredibly helpful when combined with other attribute filters or selections. For example, you might want to visualize only the terminal residues that are also visible and are part of amino acid chains:

r.ter and r.aa and r.v

Practical Application: Highlighting Chain Termini

You can use these NSL expressions in SAMSON’s Selection Filter to highlight chain ends:

  1. Open your model in SAMSON
  2. Activate the Selection Filter
  3. Enter the expression r.ter in the filter
  4. Apply a different color or representation to visually distinguish terminal residues

This method works well even in large proteins and is especially useful when preparing models where termini need special treatment, such as capping during system preparation for molecular dynamics simulations.

Going Further

If you want to filter out terminal residues that are, for example, hidden or have an undefined residue name, you can introduce further conditions:

r.ter and not r.h and r.srn

This selects terminal residues that are visible and have a standard PDB residue name.

By combining such simple expressions, you gain powerful, granular control over residue selection—without writing complex scripts or navigating laborious selection menus.

To explore more options and attributes related to residues in SAMSON, such as polarity, residue types, or sequence numbers, feel free to check out the full documentation on residue attributes:

https://documentation.samson-connect.net/users/latest/nsl/residue/

SAMSON and all SAMSON Extensions are free for non-commercial use. You can download SAMSON at https://www.samson-connect.net.

Comments are closed.