def determine_bond_col(atom_col, mol):
    """Colors bonds depending on whether the atoms involved
    share the same color.

    Parameters
    ----------
    atom_col : np.ndarray
        coloring assigned to each atom index
    mol : rdkit mol

    Returns
    -------
    dict
        bond indexes with assigned color
    """
    bond_col = {}

    for idx, bond in enumerate(mol.GetBonds()):
        atom_i_idx, atom_j_idx = bond.GetBeginAtomIdx(), bond.GetEndAtomIdx()
        if atom_i_idx in atom_col and atom_j_idx in atom_col:
            if atom_col[atom_i_idx] == atom_col[atom_j_idx]:
                bond_col[idx] = atom_col[atom_i_idx]
    return bond_col