code: private static IAtom findSingleBond(IAtomContainer container, IAtom atom, IAtom exclude) {
          for (IBond bond : container.getConnectedBondsList(atom)) {
              if (bond.getOrder() != Order.SINGLE)
                  continue;
              IAtom neighbor = bond.getOther(atom);
              if (!neighbor.equals(exclude))
                  return neighbor;
          }
          return null;
      }
docs: Finds an neighbor connected to 'atom' which is connected by a
  single bond and is not 'exclude'.
  
  @param container structure
  @param atom      atom to find a neighbor of
  @param exclude   the neighbor should not be this atom
  @return a neighbor of 'atom', null if not found