summaryrefslogtreecommitdiff
path: root/java/CdkDescriptors.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/CdkDescriptors.java')
-rw-r--r--java/CdkDescriptors.java12
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;