code: private static IAtom getOtherAtom(IAtomContainer mol, IAtom atom, IAtom other) {
          List<IBond> bonds = mol.getConnectedBondsList(atom);
          if (bonds.size() != 2)
              return null;
          if (bonds.get(0).contains(other))
              return bonds.get(1).getOrder() == IBond.Order.DOUBLE
                     ? bonds.get(1).getOther(atom) : null;
          return bonds.get(0).getOrder() == IBond.Order.DOUBLE
                      ? bonds.get(0).getOther(atom) : null;
      }
docs: internal, find a neighbor connected to 'atom' that is not 'other'