import math


def distanceModulus(i, j, pos_X, pos_Y):
    """ Measures the distance modulus between two particles i, j """
    i = int(i)
    j = int(j)
    dist_X = pos_X[j] - pos_X[i]
    dist_Y = pos_Y[j] - pos_Y[i]
    dist = math.sqrt(dist_X**2 + dist_Y**2)
    return dist