atoms_around_point
- mdtools.select.atoms_around_point(ag, point, cutoff, **kwargs)[source]
Select
Atoms
from an MDAnalysisAtomGroup
instance that are within a cutoff of a point in space.- Parameters:
ag (
MDAnalysis.core.groups.AtomGroup
) – MDAnalysisAtomGroup
,UpdatingAtomGroup
orUniverse
from which theAtoms
will be selected.point (
array_like
) – Array of shape(3,)
containing the coordinates in Angstrom of a point in space. AllAtoms
of ag that are within cutoff of that point will be selected.cutoff (
scalar
) – Select allAtoms
that are within cutoff of point. Must be greater than zero.kwargs (
dict
, optional) – Additional keyword arguments to parse toMDAnalysis.core.groups.AtomGroup.select_atoms()
. See there for possible choices. By default, warn_empty and verbose are set toFalse
.
- Returns:
selection (
MDAnalysis.core.groups.AtomGroup
) – An MDAnalysisAtomGroup
containing the selectedAtoms
.
See also
Select
class:Atoms <MDAnalysis.core.groups.Atom> from an
MDAnalysis
class:~MDAnalysis.core.groups.AtomGroup
Notes
This function uses the MDAnalysis selection syntax point x y z distance. It is just a convenient wrapper around
mdtools.select.atoms()
that allows you to simply parse an array like point and a cutoff without the need to assemble them to an MDAnalysis selection string yourself.