Browse files

Updated fingerprinter interface to support access to raw fingerprint …

…of the form Map<String,Integer>. Updated implementing classes
  • Loading branch information...
1 parent dc504db commit b0f4050553352be5eae57ab8712fd7288bf64915 @rajarshi rajarshi committed with egonw Oct 29, 2010
View
6 src/main/org/openscience/cdk/fingerprint/EStateFingerprinter.java
@@ -30,8 +30,10 @@
import org.openscience.cdk.exception.CDKException;
import org.openscience.cdk.interfaces.IAtomContainer;
import org.openscience.cdk.smiles.smarts.SMARTSQueryTool;
+import sun.reflect.generics.reflectiveObjects.NotImplementedException;
import java.util.BitSet;
+import java.util.Map;
/**
* This fingerprinter generates 79 bit fingerprints using the E-State
@@ -86,6 +88,10 @@ public BitSet getFingerprint(IAtomContainer atomContainer)
return fingerPrint;
}
+ public Map<String, Integer> getRawFingerprint(IAtomContainer iAtomContainer) throws CDKException {
+ throw new NotImplementedException();
+ }
+
@TestMethod("testGetSize")
public int getSize() {
return patterns.length;
View
6 src/main/org/openscience/cdk/fingerprint/ExtendedFingerprinter.java
@@ -32,9 +32,11 @@
import org.openscience.cdk.ringsearch.RingPartitioner;
import org.openscience.cdk.ringsearch.SSSRFinder;
import org.openscience.cdk.tools.manipulator.MolecularFormulaManipulator;
+import sun.reflect.generics.reflectiveObjects.NotImplementedException;
import java.util.BitSet;
import java.util.List;
+import java.util.Map;
/**
* Generates an extended fingerprint for a given {@link IAtomContainer}, that
@@ -99,6 +101,10 @@ public BitSet getFingerprint(IAtomContainer container)
return this.getFingerprint(container,null,null);
}
+ public Map<String, Integer> getRawFingerprint(IAtomContainer iAtomContainer) throws CDKException {
+ throw new NotImplementedException();
+ }
+
/**
* Generates a fingerprint of the default size for the given
* AtomContainer, using path and ring metrics. It contains the
View
5 src/main/org/openscience/cdk/fingerprint/Fingerprinter.java
@@ -39,6 +39,7 @@
import org.openscience.cdk.tools.LoggingToolFactory;
import org.openscience.cdk.tools.manipulator.AtomContainerManipulator;
import org.openscience.cdk.tools.periodictable.PeriodicTable;
+import sun.reflect.generics.reflectiveObjects.NotImplementedException;
import java.util.ArrayList;
import java.util.BitSet;
@@ -197,6 +198,10 @@ public BitSet getFingerprint(IAtomContainer container)
return getFingerprint(container, null);
}
+ public Map<String, Integer> getRawFingerprint(IAtomContainer iAtomContainer) throws CDKException {
+ throw new NotImplementedException();
+ }
+
/**
* Get all paths of lengths 0 to the specified length.
*
View
14 src/main/org/openscience/cdk/fingerprint/IFingerprinter.java
@@ -24,11 +24,12 @@
*/
package org.openscience.cdk.fingerprint;
-import java.util.BitSet;
-
import org.openscience.cdk.exception.CDKException;
import org.openscience.cdk.interfaces.IAtomContainer;
+import java.util.BitSet;
+import java.util.Map;
+
/**
* Interface for fingerprint calculators.
*
@@ -47,6 +48,15 @@
* @throws CDKException TODO
*/
public BitSet getFingerprint(IAtomContainer container) throws CDKException;
+
+ /**
+ * Returns the raw representation of the fingerprint for the given IAtomContainer.
+ *
+ * @param container IAtomContainer for which the fingerprint should be calculated.
+ * @return the raw fingerprint
+ * @throws CDKException
+ */
+ public Map<String, Integer> getRawFingerprint(IAtomContainer container) throws CDKException;
/**
* Returns the size of the fingerprints calculated.
View
24 src/main/org/openscience/cdk/fingerprint/MACCSFingerprinter.java
@@ -24,15 +24,6 @@
*/
package org.openscience.cdk.fingerprint;
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.BitSet;
-import java.util.Iterator;
-import java.util.List;
-
import org.openscience.cdk.CDKConstants;
import org.openscience.cdk.annotations.TestClass;
import org.openscience.cdk.annotations.TestMethod;
@@ -46,6 +37,17 @@
import org.openscience.cdk.smiles.smarts.SMARTSQueryTool;
import org.openscience.cdk.tools.ILoggingTool;
import org.openscience.cdk.tools.LoggingToolFactory;
+import sun.reflect.generics.reflectiveObjects.NotImplementedException;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.BitSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
/**
* This fingerprinter generates 166 bit MACCS keys.
@@ -148,6 +150,10 @@ public BitSet getFingerprint(IAtomContainer atomContainer)
return fingerPrint;
}
+ public Map<String, Integer> getRawFingerprint(IAtomContainer iAtomContainer) throws CDKException {
+ throw new NotImplementedException();
+ }
+
@TestMethod("getsize")
public int getSize() {
if (keys != null)
View
6 src/main/org/openscience/cdk/fingerprint/PubchemFingerprinter.java
@@ -35,8 +35,10 @@
import org.openscience.cdk.ringsearch.SSSRFinder;
import org.openscience.cdk.smiles.smarts.SMARTSQueryTool;
import org.openscience.cdk.tools.periodictable.PeriodicTable;
+import sun.reflect.generics.reflectiveObjects.NotImplementedException;
import java.util.BitSet;
+import java.util.Map;
/**
* Generates a Pubchem fingerprint for a molecule.
@@ -127,6 +129,10 @@ public BitSet getFingerprint(IAtomContainer atomContainer)
return fp;
}
+ public Map<String, Integer> getRawFingerprint(IAtomContainer iAtomContainer) throws CDKException {
+ throw new NotImplementedException();
+ }
+
/**
* Get the size of the fingerprint.
*
View
6 src/main/org/openscience/cdk/fingerprint/SubstructureFingerprinter.java
@@ -32,8 +32,10 @@
import org.openscience.cdk.exception.CDKException;
import org.openscience.cdk.interfaces.IAtomContainer;
import org.openscience.cdk.smiles.smarts.SMARTSQueryTool;
+import sun.reflect.generics.reflectiveObjects.NotImplementedException;
import java.util.BitSet;
+import java.util.Map;
/**
* {@link IFingerprinter} that gives a bit set which has a size equal to the number
@@ -421,6 +423,10 @@ public BitSet getFingerprint(IAtomContainer atomContainer)
return fingerPrint;
}
+ public Map<String, Integer> getRawFingerprint(IAtomContainer iAtomContainer) throws CDKException {
+ throw new NotImplementedException();
+ }
+
@TestMethod("testSize")
public int getSize() {
return smarts.length;

0 comments on commit b0f4050

Please sign in to comment.