def delta_func(N, Rn, aj, r):
    """Function specifically used in langmuir constant calculation

    Parameters
    ----------
    N : int
        Exponent used in calculation
    Rn : float
        Radius of cage
    aj : float
        Radius of guest molecule
    r : float
        General radius

    Returns
    ----------
    delta : float
        Distance measure
    """
    delta = ((1.0 - r/Rn - aj/Rn)**(-N) - (1.0 + r/Rn - aj/Rn)**(-N))/N
    return delta