def get_all_neighbors(mol, atom_index):
    """
    Get atom indices of all neighbors of an atom in a molecule.

    Args:
        mol (Molecule): The RMG molecule with connectivity information.
        atom_index (int): The index of the atom whos neighbors are requested.

    Returns:
        list: Atom indices of all neighbors of the requested atom.
    """
    neighbors = list()
    for atom in mol.atoms[atom_index].edges.keys():
        neighbors.append(mol.atoms.index(atom))
    return neighbors