stop the code if any particle is moving beyond the buffer