Permalink
Browse files

Fixed dependency on specific molecule impl, so now we use IAtomContai…

…ner rather than Molecule

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
  • Loading branch information...
rajarshi authored and egonw committed May 22, 2011
1 parent ad04b69 commit fbdb989bddc0c4a7f36332ae9590f4d3b2ec488f
@@ -21,7 +21,6 @@
package org.openscience.cdk.qsar.descriptors.molecular;
import org.openscience.cdk.Molecule;
import org.openscience.cdk.annotations.TestClass;
import org.openscience.cdk.annotations.TestMethod;
import org.openscience.cdk.aromaticity.CDKHueckelAromaticityDetector;
@@ -83,9 +82,9 @@
*/
@TestMethod("testCalculate_IAtomContainer")
public DescriptorValue calculate(IAtomContainer container) {
Molecule molecule;
IAtomContainer molecule;
try {
molecule = (Molecule) container.clone();
molecule = (IAtomContainer) container.clone();
} catch (CloneNotSupportedException e) {
return getDummyDescriptorValue(new CDKException("Error occured during clone " + e));
}
@@ -28,7 +28,6 @@
import javax.vecmath.Point3d;
import org.openscience.cdk.Molecule;
import org.openscience.cdk.annotations.TestClass;
import org.openscience.cdk.annotations.TestMethod;
import org.openscience.cdk.exception.CDKException;
@@ -336,10 +335,10 @@ public DescriptorValue calculate(IAtomContainer container) {
return getDummyDescriptorValue(new CDKException("Molecule must have 3D coordinates"));
double sum = 0.0;
Molecule ac;
IAtomContainer ac;
try {
ac = (Molecule) container.clone();
ac = (IAtomContainer) container.clone();
} catch (CloneNotSupportedException e) {
return getDummyDescriptorValue(e);
}

0 comments on commit fbdb989

Please sign in to comment.