  We propose a parameter-free algorithm for the identification of nearest
neighbors. The algorithm is very easy to use and has a number of advantages
over existing algorithms to identify nearest- neighbors. This solid-angle based
nearest-neighbor algorithm (SANN) attributes to each possible neighbor a solid
angle and determines the cutoff radius by the requirement that the sum of the
solid angles is 4{\pi}. The algorithm can be used to analyze 3D images, both
from experiments as well as theory, and as the algorithm has a low
computational cost, it can also be used "on the fly" in simulations. In this
paper, we describe the SANN algorithm, discuss its properties, and compare it
to both a fixed-distance cutoff algorithm and to a Voronoi construction by
analyzing its behavior in bulk phases of systems of carbon atoms, Lennard-Jones
particles and hard spheres as well as in Lennard-Jones systems with
liquid-crystal and liquid-vapor interfaces.
