def rmsd(X, Y):
    """
    Calculate the RMSD between X and Y
    X, Y are two N * 3 matrix
    Return:
        RMSD: float
    """
    n, _ = X.shape
    RMSD = (((X - Y) ** 2).sum() / n) ** 0.5
    return RMSD