In molecular modeling, one common challenge is selecting specific subsets of atoms based on precise spatial or structural criteria. Whether you’re preparing a simulation, analyzing results, or designing nano-objects, you often need to identify atoms that meet certain conditions—for example, selecting atoms within a sphere, choosing only certain element types, or isolating a region of a molecule for detailed study.
If you’ve ever found yourself manually tweaking selections or writing lengthy scripts to isolate atoms, SAMSON’s Atoms Selector Extension offers a time-saving and intuitive alternative. This extension lets you select atoms from your complex molecular systems using clean, mathematical expressions.
What is the Atoms Selector Extension?
The Atoms Selector Extension allows you to define atom selection using a single mathematical expression. It uses the same expressive and powerful syntax as the Simple Script Extension, including operators, functions, and atomic attributes—but focused solely on selecting atoms without modifying their properties.
Why this matters
For example, imagine working with a quartz crystal structure and needing to extract a cylindrical region with a radius of 10 Å. Instead of manually selecting atoms in a visualization tool, you can enter a simple expression:
|
1 |
((a.x-15)^2 + (a.y-15)^2) < 100 |
This will select all atoms whose distance to the point (15,15) in the XY-plane is less than 10, effectively defining a circular cross-section of a cylinder centered at that point.

Available Tools and Expressions
You can use a wide array of expressions, including:
- Coordinate-based selection: e.g.,
a.x > 0to select atoms on the right side of the origin. - Element filtering: e.g.,
a.e == 'Carbon'ora.symbol == 'H'. - Backbone-focused searches: e.g.,
a.aabb == trueto isolate amino acid backbones. - Logical combinations: use
and,or, parentheses to build complex selection criteria.
Want to select everything? Use:
|
1 |
all |
Tips for Using Atoms Selector
- Preview your expression: Try your expression incrementally on simple structures to develop confidence.
- Use atomic attributes effectively: Properties like
a.visibilityFlag,a.chainID, ora.serialNumbergive precise control over your selection. - Stay within the current document: The Atoms Selector only acts on the active document in view.
This kind of precision selection becomes very useful when you’re generating subsets for simulations, creating visualizations, or defining zones for further editing or scripting. Used properly, it can dramatically reduce manual work and prevent errors.
When to Use Atoms Selector (vs. Simple Script)
If you’re only interested in filtering or selecting atoms based on criteria, Atoms Selector is the fastest and simplest tool. If you also want to modify atoms (positions, element types, visibility, etc.), then you should use the Simple Script Extension instead.
To learn more about both these extensions and explore additional examples, visit the official documentation page.
SAMSON and all SAMSON Extensions are free for non-commercial use. You can get SAMSON here.
