Skip to content

Commit

Permalink
The Bioclipse test case of failing bond order assignment
Browse files Browse the repository at this point in the history
Change-Id: I86f9bc709bfd3b3e1a3b816914e2dc32bbad6df0

Signed-off-by: Rajarshi Guha <rajarshi.guha@gmail.com>
  • Loading branch information
egonw authored and rajarshi committed Mar 22, 2012
1 parent d9c147d commit 596258a
Showing 1 changed file with 26 additions and 1 deletion.
Expand Up @@ -103,7 +103,32 @@ public void testLargeRingSystem() throws Exception {
}
Assert.assertEquals(13, doubleBondCount);
}


/**
* @cdk.bug 3506770
*/
@Test
public void testLargeBioclipseUseCase() throws Exception {
String smiles = "COc1ccc2[C@@H]3[C@H](COc2c1)C(C)(C)OC4=C3C(=O)C(=O)C5=C4OC(C)(C)[C@@H]6COc7cc(OC)ccc7[C@H]56";
SmilesParser smilesParser = new SmilesParser(DefaultChemObjectBuilder.getInstance());
IMolecule molecule = smilesParser.parseSmiles(smiles);

DeduceBondSystemTool dbst = new DeduceBondSystemTool(new AllRingsFinder());
molecule = dbst.fixAromaticBondOrders(molecule);
Assert.assertNotNull(molecule);

molecule = (IMolecule) AtomContainerManipulator.removeHydrogens(molecule);
Assert.assertEquals(40, molecule.getAtomCount());

// we should have 14 double bonds
int doubleBondCount = 0;
for (int i = 0; i < molecule.getBondCount(); i++) {
IBond bond = molecule.getBond(i);
if (bond.getOrder() == Order.DOUBLE) doubleBondCount++;
}
Assert.assertEquals(10, doubleBondCount);
}

@Test(timeout=1000)
public void testPyrrole_CustomRingFinder() throws Exception {
String smiles = "c2ccc3n([H])c1ccccc1c3(c2)";
Expand Down

0 comments on commit 596258a

Please sign in to comment.