Skip to content

Commit

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

Signed-off-by: Rajarshi Guha <rajarshi.guha@gmail.com>
  • Loading branch information
egonw committed Mar 23, 2012
1 parent 63dccdf commit c52d676
Showing 1 changed file with 26 additions and 1 deletion.
Expand Up @@ -104,7 +104,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());
IAtomContainer molecule = smilesParser.parseSmiles(smiles);

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

molecule = (IAtomContainer) 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 c52d676

Please sign in to comment.