/** * A unit test for JUnit * * @exception Exception Description of the Exception */ @Test public void testResolveOverlap5() throws Exception { double overlapScore = 0; logger.debug("Test case with atom clash"); IAtomContainer atomContainer = new SmilesParser(DefaultChemObjectBuilder.getInstance()) .parseSmiles("OC4C(N2C1=C(C(=NC(=N1)SC)SC)C3=C2N=CN=C3N)OC(C4O)CO"); StructureDiagramGenerator sdg = new StructureDiagramGenerator(); sdg.setMolecule(new AtomContainer(atomContainer)); sdg.generateCoordinates(); atomContainer = sdg.getMolecule(); OverlapResolver or = new OverlapResolver(); overlapScore = or.resolveOverlap(atomContainer, null); // MoleculeViewer2D.display(new AtomContainer(atomContainer), true); Assert.assertEquals(0.0, overlapScore, 0.0001); logger.debug("End of test case with atom clash"); }
/** * A unit test for JUnit * * @exception Exception Description of the Exception */ @Test public void testResolveOverlap4() throws Exception { double overlapScore = 0; logger.debug("Test case with atom clash"); String filename = "data/cml/overlaptest.cml"; InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename); CMLReader reader = new CMLReader(ins); IChemFile chemFile = (IChemFile) reader.read(new ChemFile()); IAtomContainer atomContainer = (IAtomContainer) ChemFileManipulator.getAllAtomContainers(chemFile).get(0); // MoleculeViewer2D.display(new AtomContainer(atomContainer), false); OverlapResolver or = new OverlapResolver(); overlapScore = or.resolveOverlap(atomContainer, null); // MoleculeViewer2D.display(new AtomContainer(atomContainer), false); Assert.assertEquals(0.0, overlapScore, 0.0001); logger.debug("End of test case with atom clash"); }