Skip to content

Commit

Permalink
Adds a recalculation of atom typing and aromaticy detection after the
Browse files Browse the repository at this point in the history
bond-orders have been decided.
  • Loading branch information
KlasJoensson committed Jul 4, 2013
1 parent 3356573 commit 1e85253
Showing 1 changed file with 7 additions and 2 deletions.
Expand Up @@ -172,6 +172,7 @@
import org.openscience.cdk.tools.CDKHydrogenAdder;
import org.openscience.cdk.tools.manipulator.AtomContainerManipulator;
import org.openscience.cdk.tools.manipulator.AtomTypeManipulator;
import org.openscience.cdk.tools.manipulator.BondManipulator;
import org.openscience.cdk.tools.manipulator.ChemFileManipulator;
import org.openscience.cdk.tools.manipulator.ChemModelManipulator;
import org.openscience.cdk.tools.manipulator.MolecularFormulaManipulator;
Expand Down Expand Up @@ -1114,12 +1115,16 @@ public ICDKMolecule fromSMILES(String smilesDescription)
try {
AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms( molecule );
ataSatChecker.decideBondOrder( molecule );
// molecule = fbot.kekuliseAromaticRings(molecule);
AtomContainerManipulator.clearAtomConfigurations( molecule );
AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms( molecule );
CDKHueckelAromaticityDetector.detectAromaticity(molecule);

} catch (CDKException exception) {
logger.warn("Could not figure out the double bond positions: " + exception.getMessage());
} catch (NullPointerException npe) {
throw new IllegalStateException("Could not create molecule from: "+smilesDescription,npe);
}
}

return new CDKMolecule(molecule);
}

Expand Down

0 comments on commit 1e85253

Please sign in to comment.