def METHOD_NAME(mol, hops):
    # # this function truncates a ligand to a certain number of
    # # hops from the core
    # Inputs:
    #       mol - mol3D class to truncate
    #       con_atoms - index of atoms that connect to metal
    #       hops - int, number of hops to truncate
    trunc_mol = mol3D(use_atom_specific_cutoffs=mol.use_atom_specific_cutoffs)
    metal_ind = mol.findMetal()[0]
    trunc_mol.addAtom(mol.getAtom(metal_ind))
    added_list = list()
    added_list.append(metal_ind)
    hopped = 0
    active_set = [metal_ind]
    while hopped < hops:
        hopped += 1
        new_active_set = list()
        for this_atom in active_set:
            # add all connection atoms
            if this_atom not in added_list:
                trunc_mol.addAtom(mol.getAtom(this_atom))
                added_list.append(this_atom)
            # prepare all atoms attached to this connection
            this_atoms_neighbors = mol.getBondedAtomsSmart(this_atom)
            for bound_atoms in this_atoms_neighbors:
                if (bound_atoms not in added_list):
                    trunc_mol.addAtom(mol.getAtom(bound_atoms))
                    added_list.append(bound_atoms)
                [new_active_set.append(element) for element in this_atoms_neighbors]
        active_set = new_active_set
    sort_inds = np.argsort(added_list)
    mapping_sub2mol = {}
    for ii, ind in enumerate(sort_inds):
        mapping_sub2mol.update({ind: added_list[ii]})
    trunc_mol.mapping_sub2mol = mapping_sub2mol
    if len(mol.graph):
        delete_inds = [x for x in range(mol.natoms) if x not in added_list]
        trunc_mol.atoms = [trunc_mol.atoms[x] for x in sort_inds]
        trunc_mol.graph = np.delete(np.delete(mol.graph, delete_inds, 0), delete_inds, 1)
    if mol.bo_dict:
        save_bo_dict = mol.get_bo_dict_from_inds(added_list)
        trunc_mol.bo_dict = save_bo_dict
    return trunc_mol