Selection.select_sphere() — select all atoms within radius

select_sphere(radius)
This returns a new selection containing all atoms within the given distance from any atom in the current selection (note that this uses only the current coordinates — if you move the atoms later, e.g. during an optimization, the set of atoms does not change). Compare with Point.select_sphere().
Example: See Selection() command.