Skip to content

Commit

Permalink
Use the FixBondOrdersTool for SD file parsing too
Browse files Browse the repository at this point in the history
  • Loading branch information
egonw committed Jul 10, 2012
1 parent 987b3b2 commit c3a09cc
Showing 1 changed file with 7 additions and 0 deletions.
Expand Up @@ -1301,6 +1301,7 @@ static class IteratingBioclipseMDLReader

IteratingMDLReader reader;
IProgressMonitor monitor = new NullProgressMonitor();
FixBondOrdersTool tool = new FixBondOrdersTool();

public IteratingBioclipseMDLReader( InputStream input,
IChemObjectBuilder builder,
Expand All @@ -1323,6 +1324,12 @@ public boolean hasNext() {
public ICDKMolecule next() {
org.openscience.cdk.interfaces.IMolecule cdkMol
= (org.openscience.cdk.interfaces.IMolecule) reader.next();
try {
AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(cdkMol);
tool.kekuliseAromaticRings(cdkMol);
} catch (CDKException e) {
logger.debug("Error while searching double bonds..." + e.getMessage());
}
ICDKMolecule bioclipseMol = new CDKMolecule(cdkMol);
monitor.worked(1);
return bioclipseMol;
Expand Down

0 comments on commit c3a09cc

Please sign in to comment.