Skip to content

Commit

Permalink
Fixed dependency on specific molecule impl, so now we use IAtomContai…
Browse files Browse the repository at this point in the history
…ner rather than Molecule

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
  • Loading branch information
rajarshi authored and egonw committed Jun 7, 2011
1 parent ad04b69 commit fbdb989
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Expand Up @@ -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;
Expand Down Expand Up @@ -83,9 +82,9 @@ private static double[] listpolarizability(IAtomContainer container, int[][] dma
*/
@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));
}
Expand Down
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit fbdb989

Please sign in to comment.