Generator { static String generate(final Graph g) throws InvalidSmilesException { return new Generator(g, new IterativeRingNumbering(1)).string(); } Generator(Graph g, RingNumbering rnums);   Generator(Graph g, int[] visitedAt, RingNumbering rnums);   }
@Test public void permuteTH_3_nonRing() throws Exception { String input = "C[C@H](N)O"; Graph g = Parser.parse(input); assertThat(Generator.generate(g), is(input)); }
@Test public void permuteTH_4_nonRing() throws Exception { String input = "C[C@]([H])(N)O"; Graph g = Parser.parse(input); assertThat(Generator.generate(g), is(input)); }
@Test public void permuteTH_4_ring() throws Exception { String input = "C[C@]12CCCC[C@@]1(C)OCCC2"; Graph g = Parser.parse(input); assertThat(Generator.generate(g), is(input)); }
@Test public void bondTypeOnFirstAtom1() throws InvalidSmilesException { String smi = "C1C=CC=CC=1"; String exp = "C=1C=CC=CC1"; assertThat(Generator.generate(Parser.parse(smi)), is(exp)); }
@Test public void bondTypeOnFirstAtom2() throws InvalidSmilesException { String smi = "C=1C=CC=CC1"; String exp = "C=1C=CC=CC1"; assertThat(Generator.generate(Parser.parse(smi)), is(exp)); }
@Test public void bondTypeOnFirstAtom3() throws InvalidSmilesException { String smi = "C=1C=CC=CC=1"; String exp = "C=1C=CC=CC1"; assertThat(Generator.generate(Parser.parse(smi)), is(exp)); }
@Test public void directionalBondTypeOnFirstAtom1() throws InvalidSmilesException { String smi = "C1CCCCCCCCCCC\\C=C/1"; String exp = "C\\1CCCCCCCCCCC\\C=C1"; assertThat(Generator.generate(Parser.parse(smi)), is(exp)); }
@Test public void directionalBondTypeOnFirstAtom2() throws InvalidSmilesException { String smi = "C\\1CCCCCCCCCCC\\C=C1"; String exp = "C\\1CCCCCCCCCCC\\C=C1"; assertThat(Generator.generate(Parser.parse(smi)), is(exp)); }
@Test public void directionalBondTypeOnFirstAtom3() throws InvalidSmilesException { String smi = "C\\1CCCCCCCCCCC\\C=C/1"; String exp = "C\\1CCCCCCCCCCC\\C=C1"; assertThat(Generator.generate(Parser.parse(smi)), is(exp)); }