Skip to content

Commit

Permalink
Removed field declarations of Molecule
Browse files Browse the repository at this point in the history
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
  • Loading branch information
rajarshi authored and egonw committed Dec 11, 2011
1 parent 436dba5 commit 88a2935
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/main/org/openscience/cdk/io/inchi/INChIHandler.java
Expand Up @@ -58,7 +58,7 @@ public class INChIHandler extends DefaultHandler {
private ChemSequence chemSequence;
private ChemModel chemModel;
private IAtomContainerSet setOfMolecules;
private Molecule tautomer;
private IAtomContainer tautomer;

/** Used to store all chars between two tags */
private String currentChars;
Expand Down
16 changes: 8 additions & 8 deletions src/main/org/openscience/cdk/isomorphism/IsomorphismTester.java
Expand Up @@ -29,7 +29,7 @@
import org.openscience.cdk.exception.NoSuchAtomException;
import org.openscience.cdk.graph.invariant.MorganNumbersTools;
import org.openscience.cdk.interfaces.IAtom;
import org.openscience.cdk.interfaces.IMolecule;
import org.openscience.cdk.interfaces.IAtomContainer;

import java.util.Arrays;

Expand Down Expand Up @@ -61,8 +61,8 @@ public class IsomorphismTester implements java.io.Serializable
long[] sortedBaseTable;
long[] compareTable;
long[] sortedCompareTable;
IMolecule base = null;
IMolecule compare = null;
IAtomContainer base = null;
IAtomContainer compare = null;


/**
Expand All @@ -74,7 +74,7 @@ public IsomorphismTester() { }
/**
* Constructor for the IsomorphismTester object
*/
public IsomorphismTester(IMolecule mol) throws NoSuchAtomException
public IsomorphismTester(IAtomContainer mol) throws NoSuchAtomException
{
setBaseTable(mol);
}
Expand All @@ -89,7 +89,7 @@ public IsomorphismTester(IMolecule mol) throws NoSuchAtomException
* @return True, if the two molecules are isomorphic
*/
@TestMethod("testIsIsomorphic_IMolecule_IMolecule")
public boolean isIsomorphic(IMolecule mol1, IMolecule mol2) {
public boolean isIsomorphic(IAtomContainer mol1, IAtomContainer mol2) {
setBaseTable(mol1);
return isIsomorphic(mol2);
}
Expand All @@ -103,7 +103,7 @@ public boolean isIsomorphic(IMolecule mol1, IMolecule mol2) {
* @return True, if the two molecules are isomorphic
*/
@TestMethod("testIsIsomorphic_IMolecule")
public boolean isIsomorphic(IMolecule mol2) {
public boolean isIsomorphic(IAtomContainer mol2) {
boolean found;
IAtom atom1 = null;
IAtom atom2 = null;
Expand Down Expand Up @@ -146,7 +146,7 @@ public boolean isIsomorphic(IMolecule mol2) {
*
* @param mol The new BaseTable value
*/
private void setBaseTable(IMolecule mol) {
private void setBaseTable(IAtomContainer mol) {
this.base = mol;
this.baseTable = MorganNumbersTools.getMorganNumbers(base);
sortedBaseTable = new long[baseTable.length];
Expand All @@ -160,7 +160,7 @@ private void setBaseTable(IMolecule mol) {
*
* @param mol The new CompareTable value
*/
private void setCompareTable(IMolecule mol) {
private void setCompareTable(IAtomContainer mol) {
this.compare = mol;
this.compareTable = MorganNumbersTools.getMorganNumbers(compare);
sortedCompareTable = new long[compareTable.length];
Expand Down
10 changes: 8 additions & 2 deletions src/test/org/openscience/cdk/graph/PathToolsTest.java
Expand Up @@ -26,7 +26,13 @@
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import org.openscience.cdk.*;
import org.openscience.cdk.Atom;
import org.openscience.cdk.AtomContainer;
import org.openscience.cdk.Bond;
import org.openscience.cdk.CDKConstants;
import org.openscience.cdk.CDKTestCase;
import org.openscience.cdk.DefaultChemObjectBuilder;
import org.openscience.cdk.Molecule;
import org.openscience.cdk.exception.InvalidSmilesException;
import org.openscience.cdk.interfaces.IAtom;
import org.openscience.cdk.interfaces.IAtomContainer;
Expand All @@ -46,7 +52,7 @@
* @cdk.module test-core
*/
public class PathToolsTest extends CDKTestCase {
private static Molecule molecule;
private static IAtomContainer molecule;
private static SmilesParser sp;

@BeforeClass
Expand Down
Expand Up @@ -45,7 +45,7 @@
*/
public class IsomorphismTesterTest extends CDKTestCase
{
Molecule pinene_1 = null, pinene_2 = null, pinene_non = null;
IAtomContainer pinene_1 = null, pinene_2 = null, pinene_non = null;
public IsomorphismTesterTest()
{
super();
Expand Down

0 comments on commit 88a2935

Please sign in to comment.