def dist_PWM(pwm1, pwm2):
    """Euclidian distance between two PWM.

    $ D_{(a,b)} = rac{1}{W} \\sum_{i=1}^{w} rac{1}{2} \\sum (a_{i,L} - b_{i,L})^2 $

    Parameters
    ----------

    Returns
    -------

    """
    assert pwm1.shape == pwm2.shape
    w = len(pwm1.columns)
    colum = list()
    for c in pwm1.columns:
        rows = list()
        for r in pwm1.index:
            rows.append((pwm1.at[r, c] - pwm2.at[r, c]) ** 2)
        colum.append(sum(rows) * 0.5)
    return sum(colum) / float(w)
