The pairwise distance between all particles in the cell and in one of the neighbouring cells is computed.
A measure of how far apart every particle is, both inside the cell and in a neighboring cell, is determined.