If you’re working with complex molecular systems, you’ve probably encountered the challenge of selecting specific subsets of atoms that match your criteria — atoms with certain charges, elements, positions, or structural context. Doing this manually is time-consuming and error-prone, especially for large and intricate models. That’s where SAMSON’s Atoms Selector Extension comes in.
With this simple yet powerful tool, you can select atoms based on mathematical expressions involving their properties, allowing you to automate atom selection in complex scenarios.
Why Atom Selection Matters
Atom selection is often the first and most critical step in molecular modeling workflows: preparing a functional group for analysis, isolating a protein backbone, or cutting out a nanostructure from a material. Precision matters — and so does speed.
The Atoms Selector Extension: A Simple Expression-Based Tool
The Atoms Selector Extension in SAMSON allows you to select atoms using mathematical expressions based on atom attributes like position, element, charge, and more.
Using the same syntax as the Simple Script Extension, you can write expressions directly in the interface. For example:
|
1 |
((a.x-15)^2 + (a.y-15)^2) < 100 |
This expression selects atoms inside a cylinder in the XY plane centered at (15,15) with a radius of 10 Å. Combining variables like a.x, a.element, and logical operators like and, or, and not, you can build complex conditions easily.
Examples to Get You Started
Below are a few handy examples drawn from the SAMSON documentation to highlight useful cases:
Select all carbon atoms
|
1 |
a.e == 'Carbon' |
Select atoms in the right half of the XY plane
|
1 |
a.x > 0 and a.y > 0 |
Select water molecules
|
1 |
a.w == 1 |
Select atoms from residue number 12
|
1 |
a.resi == 12 |
And one of the most visually satisfying applications: cutting a cylindrical region out of a crystal structure. For example, the quartz cut shown below was made using:
|
1 |
((a.x-15)^2 + (a.y-15)^2) < 100 |

Combine with Visualizations and Scripts
The Atoms Selector is also a great companion for more advanced scripting and visualization. Once you’ve selected atoms, combine this selection with visual filters or scripted modifications using the Simple Script Extension.
If you’re just getting started or need a usable middle step between manual selection and full programmatic control, this tool provides a good balance of flexibility and simplicity.
Learn More and Start Using It
To dive deeper into the options and syntax, head over to the full documentation:
https://documentation.samson-connect.net/tutorials/simple-script/making-nano-batarangs-and-more/
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON at https://www.samson-connect.net.
