code: public synchronized void canonLabel(IAtomContainer atomContainer) {
          if (atomContainer.getAtomCount() == 0) return;
          if (atomContainer.getAtomCount() == 1) {
              atomContainer.getAtom(0).setProperty(InvPair.CANONICAL_LABEL, 1);
          }
  
          List<InvPair> vect = createInvarLabel(atomContainer);
          step3(vect, atomContainer);
      }
docs: Canonically label the fragment.  The labels are set as atom property InvPair.CANONICAL_LABEL of type Integer, indicating the canonical order.
  This is an implementation of the algorithm published in
  David Weininger et.al. {@cdk.cite WEI89}.
  
  <p>The Collections.sort() method uses a merge sort which is
  stable and runs in n log(n).
  
  <p>It is assumed that a chemically valid AtomContainer is provided:
  this method does not check
  the correctness of the AtomContainer. Negative H counts will
  cause a NumberFormatException to be thrown.
  @param atomContainer The molecule to label