def _bond_dist(geom, a1, a2):
    """
    Computes a simple bond distance between two rows in a flat (n, 3) list of coordinates
    """
    a13 = a1 * 3
    a23 = a2 * 3

    xd = (geom[a13] - geom[a23])**2
    yd = (geom[a13 + 1] - geom[a23 + 1])**2
    zd = (geom[a13 + 2] - geom[a23 + 2])**2

    return (xd + yd + zd)**0.5