diff options
author | mguetlein <martin.guetlein@gmail.com> | 2014-10-30 13:34:55 +0100 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2014-10-30 13:34:55 +0100 |
commit | 6151bfa65bd5493ed7b7a095158f8ea16597ed75 (patch) | |
tree | 4d54a424f5e6bd8d16ad8418413fe5d2abcbbc3e | |
parent | 2d61acd545061bb2fa165fbc702ae4c2cef074c6 (diff) |
add arom detection to cdk feature generation
-rw-r--r-- | java/CdkDescriptors.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/java/CdkDescriptors.java b/java/CdkDescriptors.java index 42a44e1..1236240 100644 --- a/java/CdkDescriptors.java +++ b/java/CdkDescriptors.java @@ -5,6 +5,9 @@ import org.openscience.cdk.interfaces.IMolecule; import org.openscience.cdk.io.iterator.IteratingMDLReader; import org.openscience.cdk.qsar.*; import org.openscience.cdk.qsar.DescriptorValue; +import org.openscience.cdk.aromaticity.CDKHueckelAromaticityDetector; +import org.openscience.cdk.tools.manipulator.AtomContainerManipulator; +import org.openscience.cdk.exception.NoSuchAtomTypeException; class CdkDescriptors { public static void main(String[] args) { @@ -57,6 +60,15 @@ class CdkDescriptors { try { System.out.println("computing "+(args.length-1)+" descriptors for compound "+(++c)); IMolecule molecule = (IMolecule)reader.next(); + molecule = (IMolecule) AtomContainerManipulator.removeHydrogens(molecule); + try { + AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(molecule); + } + catch (NoSuchAtomTypeException e) { + e.printStackTrace(); + } + CDKHueckelAromaticityDetector.detectAromaticity(molecule); + engine.process(molecule); Map<Object,Object> properties = molecule.getProperties(); Boolean first = true; |