atoms_around_point
- mdtools.select.atoms_around_point(ag, point, cutoff, **kwargs)[source]
Select
Atomsfrom an MDAnalysisAtomGroupinstance that are within a cutoff of a point in space.- Parameters:
ag (
MDAnalysis.core.groups.AtomGroup) – MDAnalysisAtomGroup,UpdatingAtomGrouporUniversefrom which theAtomswill be selected.point (
array_like) – Array of shape(3,)containing the coordinates in Angstrom of a point in space. AllAtomsof ag that are within cutoff of that point will be selected.cutoff (
scalar) – Select allAtomsthat 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 MDAnalysisAtomGroupcontaining the selectedAtoms.
See also
Selectclass:Atoms <MDAnalysis.core.groups.Atom> from an
MDAnalysisclass:~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.