Skip to content

Commit

Permalink
Updated PubchemFingperinter to not use static variables. Allows it to…
Browse files Browse the repository at this point in the history
… be used in multithreaded scenarios

Change-Id: Iaa9481fd1fa5793cb5fe3b449219aeb7958a983d
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
  • Loading branch information
rajarshi authored and egonw committed Apr 1, 2012
1 parent 7c5d18b commit 9bd6b45
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -86,11 +86,11 @@
public class PubchemFingerprinter implements IFingerprinter {

// number of bits in this fingerprint
public static int FP_SIZE = 881;
public static final int FP_SIZE = 881;

private byte[] m_bits;

private static SMARTSQueryTool sqt;
private SMARTSQueryTool sqt;

public PubchemFingerprinter() {
try {
Expand Down Expand Up @@ -300,7 +300,7 @@ && countHeteroInRing(ring) > 0)
}
}

static class CountSubstructures {
class CountSubstructures {
private IAtomContainer mol;

public CountSubstructures(IAtomContainer m) {
Expand All @@ -316,7 +316,7 @@ public int countSubstructure(String smarts) throws CDKException {
}
}

static private void _generateFp(byte[] fp, IAtomContainer mol)
private void _generateFp(byte[] fp, IAtomContainer mol)
throws CDKException {
countElements(fp, mol);
countRings(fp, mol);
Expand Down Expand Up @@ -1086,7 +1086,7 @@ private static void countRings(byte[] fp, IAtomContainer mol) {
if (cr.countHeteroAromaticRing() >= 4) fp[b >> 3] |= MASK[b % 8];
}

private static void countSubstructures(byte[] fp, IAtomContainer mol) throws CDKException {
private void countSubstructures(byte[] fp, IAtomContainer mol) throws CDKException {
CountSubstructures cs = new CountSubstructures(mol);
int b;

Expand Down

0 comments on commit 9bd6b45

Please sign in to comment.