code: public static long[] label(IAtomContainer container, int[][] g, long[] initial) {
          if (initial.length != g.length)
              throw new IllegalArgumentException("number of initial != number of atoms");
          return new Canon(g, initial, terminalHydrogens(container, g), false).labelling;
      }
docs: Compute the canonical labels for the provided structure. The labelling
  does not consider isomer information or stereochemistry. This method
  allows provision of a custom array of initial invariants.
  
  
  The current
  implementation does not fully distinguish all structure topologies
  but in practise performs well in the majority of cases. A complete
  canonical labelling can be obtained using the {@link InChINumbersTools}
  but is computationally much more expensive.
  
  @param container  structure
  @param g          adjacency list graph representation
  @param initial    initial seed invariants
  @return the canonical labelling
  @see EquivalentClassPartitioner
  @see InChINumbersTools