/** * Checks whether a given molecule is isomorphic with the one * that has been assigned to this IsomorphismTester at construction time. * * @param mol1 A first molecule to check against the second one * @param mol2 A second molecule to check against the first * @return True, if the two molecules are isomorphic */ public boolean isIsomorphic(IAtomContainer mol1, IAtomContainer mol2) { setBaseTable(mol1); return isIsomorphic(mol2); }
@Test public void testIsIsomorphic_IAtomContainer_IAtomContainer() throws Exception { IsomorphismTester it = new IsomorphismTester(); Assert.assertTrue(it.isIsomorphic(pinene_2, pinene_1)); Assert.assertFalse(it.isIsomorphic(pinene_2, pinene_non)); }
@Test public void testIsIsomorphic_IAtomContainer() throws Exception { IsomorphismTester it = new IsomorphismTester(pinene_1); Assert.assertTrue(it.isIsomorphic(pinene_2)); Assert.assertFalse(it.isIsomorphic(pinene_non)); }
assertTrue(it.isIsomorphic(mol.getBuilder().newInstance(IAtomContainer.class, mol)));