Precise Atom Selection with Math: Save Time with the Atoms Selector in SAMSON

In molecular modeling, selecting specific atoms from large molecular systems often becomes tedious—especially when spatial or chemical criteria are involved. For instance, extracting atoms from exact regions of crystal lattices or focusing on a subchain of a protein might require manually clicking through hundreds or even thousands of atoms. Fortunately, SAMSON offers a highly efficient solution: the Atoms Selector Extension.

The Atoms Selector allows you to define atom selections based on powerful mathematical expressions. It helps save time, improve reproducibility, and avoid human error in atom choices. Instead of point-and-click, just define what you want in an equation.

How Does It Work?

Atoms Selector uses the same scripting language and variables as the Simple Script Extension—meaning if you’re familiar with expressions like a.x, a.element, or a.occupancy, you’re already halfway there.

To use the Atoms Selector, input your selection condition into its interface. SAMSON will instantly select the atoms matching that condition in the active document.

Typical Use Case: Focus on a Specific Region of a Crystal

Imagine you want to extract and isolate a cylindrical region of 10 Å radius from a quartz crystal. Instead of manually selecting atoms one by one in 3D, just define a mathematical condition based on spatial coordinates.

Here’s a simple expression to select all atoms within a radius of 10 Å centered at (15, 15) in the xy-plane:

SAMSON will automatically highlight all atoms that satisfy this condition, effectively cutting out a cylindrical region from the structure.

Cut cylinder out of quartz crystal

What Can You Use It For?

  • Isolate functional groups in large molecules
  • Extract atoms from specific residues or chains (e.g., a.resi==42)
  • Select elements of interest (e.g., a.symbol=='O')
  • Perform symmetry operations by selecting regions to replicate or transform
  • Select all atoms in one command using: all

A Few Tips

  • You can use Boolean logic, such as and, or, and not
  • Use atom properties like position (a.x, a.y, a.z), charge (a.formalCharge), and chain index (a.chainID)
  • Expressions are case-insensitive: a.x is the same as A.X

The Atoms Selector is ideal for both beginners and advanced users who want fine control over atom selection. It avoids repetitive manual effort and ensures that your selection criteria are precise and easy to reuse.

To learn more, visit the official documentation page: Making nano-batarangs (and more).

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

Comments are closed.