Efficiently Select Atoms with Mathematical Expressions in SAMSON

When working with large molecular systems, one of the most time-consuming tasks for molecular modelers is selecting specific atoms or groups of atoms based on precise geometric or chemical criteria. Manual selections can quickly become unmanageable, especially in dense structures like crystals or protein complexes.

This is where the Atoms Selector Extension in SAMSON can help. Instead of visually selecting atoms or navigating complex tree structures, you can use mathematical expressions to select atoms with high precision. Whether you’re carving nano-tiles from graphene or isolating a functional group in a drug molecule, this tool simplifies the workflow.

How It Works

The Atoms Selector Extension allows you to select atoms in the active document using mathematical and logical expressions. These expressions can involve:

  • Coordinates: a.x, a.y, a.z
  • Element information: a.element, a.elementID, a.symbol
  • Charges, backbone membership, visibility, and more

For example, to select atoms located within a 10Å radius cylinder, you can write:

This expression selects all atoms within a cylinder centered at (15,15) in the x-y plane. You can combine conditions using logical operators like and, or, and not, or use functions like abs or sqrt to create more complex selectors.

Applications and Examples

This capability is useful in many common modeling tasks:

  • Substructure Isolation: Select side chains, backbones, or ligand environments using residue and chain information.
  • Spatial Filters: Select atoms within a sphere, cube, or cylinder to zoom in on regions of interest.
  • Design and Nanofabrication: Carve out nanoscale shapes in crystals or sheets, like the nano-cylinder from quartz shown below.

Cut cylinder out of quartz crystal

Because the expressions you provide are evaluated programmatically, they are reproducible and can be modified easily for use on different systems. It also helps reduce selection errors that plague manual processes.

Getting Started

To use the Atoms Selector:

  1. Install the extension via SAMSON Connect.
  2. Open your molecular model in SAMSON.
  3. Launch the Atoms Selector Extension and enter your selection expression.
  4. Execute the expression to highlight the selected atoms.

Expressions are powerful yet readable. For instance, to select all carbon atoms in the x > 0 half-space:

There’s also a convenience keyword, all, if you need to apply something globally.

With this tool, you’ll likely save a significant amount of time and improve the accuracy of your modeling workflows.

To explore additional capabilities, including scripting and complex structure manipulation, read the full documentation page.

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

Comments are closed.