def get_connectivity_table(molecule, inverse_map):
    """
    Generate connectivity table for molecule using map indices from atom map
    Parameters
    ----------
    molecule: oechem.OEMol
    inverse_map: dict {atom_idx:atom_map}

    Returns
    -------
    connectivity_table: list of lists
        [[atom1, atom2, bond_order]...]

    """
    connectivity_table = [[inverse_map[bond.GetBgnIdx()]-1, inverse_map[bond.GetEndIdx()]-1, bond.GetOrder()] for bond
                          in molecule.GetBonds()]

    return connectivity_table