InChINumbersTools { public static long[] getUSmilesNumbers(IAtomContainer container) throws CDKException { String aux = auxInfo(container, INCHI_OPTION.RecMet, INCHI_OPTION.FixedH); return parseUSmilesNumbers(aux, container); }  static long[] getNumbers(IAtomContainer atomContainer); static void parseAuxInfo(String aux, long[] numbers); static long[] getUSmilesNumbers(IAtomContainer container);  }
@Test public void favorCarbonyl() throws Exception { IAtomContainer container = new SmilesParser(SilentChemObjectBuilder.getInstance()).parseSmiles("P([O-])=O"); assertThat(InChINumbersTools.getUSmilesNumbers(container), is(new long[]{3, 2, 1})); }
@Test public void unlabelledHydrogens() throws Exception { IAtomContainer container = new SmilesParser(SilentChemObjectBuilder.getInstance()) .parseSmiles("[H]C([H])([H])[H]"); assertThat(InChINumbersTools.getUSmilesNumbers(container), is(new long[]{2, 1, 3, 4, 5})); }
@Test public void bug1370() throws Exception { IAtomContainer container = new SmilesParser(SilentChemObjectBuilder.getInstance()) .parseSmiles("O=[Bi]Cl"); assertThat(InChINumbersTools.getUSmilesNumbers(container), is(new long[]{3, 1, 2})); }
@Test public void protons() throws Exception { IAtomContainer container = new SmilesParser(SilentChemObjectBuilder.getInstance()) .parseSmiles("[H+].[H+].F[Si-2](F)(F)(F)(F)F"); assertThat(InChINumbersTools.getUSmilesNumbers(container), is(new long[]{8, 9, 1, 7, 2, 3, 4, 5, 6})); }