/** * Test generation of a reaction SMILES. I know, it's a stupid alchemic reaction, but it serves * its purpose. */ @Test public void testReactionSMILES() { Reaction reaction = new Reaction(); IAtomContainer methane = new AtomContainer(); methane.addAtom(new Atom("C")); reaction.addReactant(methane); IAtomContainer magic = new AtomContainer(); magic.addAtom(new PseudoAtom("magic")); reaction.addAgent(magic); IAtomContainer gold = new AtomContainer(); gold.addAtom(new Atom("Au")); reaction.addProduct(gold); SmilesGenerator sg = new SmilesGenerator(); try { String smiles = sg.createSMILES(reaction); // logger.debug("Generated SMILES: " + smiles); Assert.assertEquals("C>[*]>[Au]", smiles); } catch (Exception exc) { System.out.println(exc); } }
public void addAgent(IMolecule agent) { logger.debug("Adding agent: ", agent); super.addAgent(agent); }