Quickly Find Structural Elements by Name in SAMSON

When working with complex biomolecular structures, selecting the right atoms, residues, or fragments can feel like searching for a needle in a haystack. Scrolling through long lists or manually clicking in the Document view becomes inefficient as models grow in size. Fortunately, SAMSON’s Node Specification Language (NSL) offers a powerful way to locate elements by name using just a few keystrokes.

Whether you’re searching for a specific residue like ALA 22 or locating all carbon alpha atoms, knowing how to use name-based selection in NSL can drastically improve your modeling workflow.

Select Nodes by Name

In NSL, simply typing a quoted string allows you to select nodes by their name. For example:

  • "ALA 22" selects a node named ALA 22.
  • "CA*" selects all nodes whose names begin with CA (e.g., carbon alpha atoms).
  • "*AL*" selects all nodes containing AL in their names (like ALA or VAL residues).

NSL supports wildcard characters such as *, which can be placed anywhere in the name to match various nodes. This means you can quickly select all alanines with:

To make this even faster, press Tab after entering an opening quote. SAMSON will offer auto-completion suggestions based on what exists in your model. For example, if you type "ALA and press Tab, it may suggest:

  • "ALA 22 Backbone"
  • "ALA 22 Side chain"
  • "ALA 28"

This approach is especially helpful when dealing with long and descriptive names or when you’re unsure of the exact spelling.

Where Can You Use This?

There are two main places where name-based NSL expressions can be applied:

1. The Find Command

Accessible via Select > Find or the shortcut Ctrl + F (or Cmd + F on macOS), the Find command lets you enter an NSL string and instantly select matching nodes. Here’s an example:

Select nodes with the Find command

Type:

…and that specific structural group will be selected in your active document.

2. The Document View Filter

You can also apply name-based filters directly in the Document view to isolate matching groups. Click on the filter box and type:

This will show all nodes related to glycine (residues, backbones, etc.) in the Document hierarchy. Press Enter to select them.

Use Wildcard Selection to Speed Up Repetitive Tasks

Imagine you want to quickly color all alanine residues in a different way. Instead of manually picking them one by one:

  1. Use the Find command.
  2. Type "ALA*".
  3. Select all matching nodes at once.
  4. Change their visual settings (e.g., color or representation).

This technique proves useful not just for selection but also for property editing, structure comparison, and preparing data for simulations.

Looking Up Node Names

If you’re not sure about the exact names used in your model, the Tab key is your friend. It brings context-aware completion that helps discover valid node names on the fly, without having to dig through menus or external references.

Learn more about SAMSON’s Node Specification Language and its selection capabilities here: https://documentation.samson-connect.net/users/latest/nsl/

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

Comments are closed.