An internal method to get an integral between two bounds of a unit
        semicircle. Used in algorithm to determine bond probabilities.
        Args:
            dist_bins: (float) list of all possible bond weights
            idx: (float) index of starting bond weight

        Returns:
            (float) integral of portion of unit semicircle

def _semicircle_integral(dist_bins, idx):
        """
        An internal method to get an integral between two bounds of a unit
        semicircle. Used in algorithm to determine bond probabilities.
        Args:
            dist_bins: (float) list of all possible bond weights
            idx: (float) index of starting bond weight

        Returns:
            (float) integral of portion of unit semicircle

        """
        r = 1

        x1 = dist_bins[idx]
        x2 = dist_bins[idx + 1]

        if dist_bins[idx] == 1:
            area1 = 0.25 * math.pi * r ** 2
        else:
            area1 = 0.5 * ((x1 * math.sqrt(r ** 2 - x1 ** 2)) + (
                    r ** 2 * math.atan(x1 / math.sqrt(r ** 2 - x1 ** 2))))

        area2 = 0.5 * ((x2 * math.sqrt(r ** 2 - x2 ** 2)) + (
                r ** 2 * math.atan(x2 / math.sqrt(r ** 2 - x2 ** 2))))

        return (area1 - area2) / (0.25 * math.pi * r ** 2)