test_class.declarator: parser
test_class.original_string: SmilesParser parser;
test_class.type: SmilesParser
test_class.var_name: parser
test_class.file: descriptor/fingerprint/src/test/java/org/openscience/cdk/fingerprint/PubchemFingerprinterTest.java
test_class.identifier: PubchemFingerprinterTest
test_class.superclass: extends AbstractFixedLengthFingerprinterTest
test_case.body: @Test
      public void testMultithreadedUsage() throws Exception {
          IAtomContainer mol1 = parser.parseSmiles("C=C(C1=CC=C(C=C1)O)NNC2=C(C(=NC(=C2Cl)Cl)C(=O)O)Cl");
          IAtomContainer mol2 = parser
                  .parseSmiles("C1=CC=C(C=C1)C[N+]2=C(C=C(C=C2C=CC3=CC=CC=C3)C4=CC=CC=C4)C5=CC=CC=C5");
  
          AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol1);
          AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol2);
  
          CDKHydrogenAdder adder = CDKHydrogenAdder.getInstance(mol1.getBuilder());
          adder.addImplicitHydrogens(mol1);
          AtomContainerManipulator.convertImplicitToExplicitHydrogens(mol1);
          Aromaticity.cdkLegacy().apply(mol1);
  
          adder.addImplicitHydrogens(mol2);
          AtomContainerManipulator.convertImplicitToExplicitHydrogens(mol2);
          Aromaticity.cdkLegacy().apply(mol2);
  
          IFingerprinter fp = new PubchemFingerprinter(DefaultChemObjectBuilder.getInstance());
          BitSet bs1 = fp.getBitFingerprint(mol1).asBitSet();
          BitSet bs2 = fp.getBitFingerprint(mol2).asBitSet();
  
          class FpRunner implements Callable<BitSet> {
  
              IAtomContainer mol;
  
              FpRunner(IAtomContainer mol) {
                  this.mol = mol;
              }
  
              @Override
              public BitSet call() throws Exception {
                  BitSet fp = null;
                  IFingerprinter fpr = new PubchemFingerprinter(DefaultChemObjectBuilder.getInstance());
                  try {
                      fp = fpr.getBitFingerprint(mol).asBitSet();
                  } catch (CDKException e) {
                      e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
                  }
                  return fp;
              }
          }
  
          // now lets run some threads
          ExecutorService executor = Executors.newFixedThreadPool(2);
          List<FpRunner> tasks = new ArrayList<FpRunner>();
          tasks.add(new FpRunner(mol1));
          tasks.add(new FpRunner(mol2));
          List<Future<BitSet>> ret = executor.invokeAll(tasks);
  
          BitSet fb1 = ret.get(0).get();
          Assert.assertNotNull(fb1);
  
          BitSet fb2 = ret.get(1).get();
          Assert.assertNotNull(fb2);
  
          Assert.assertEquals(bs1, fb1);
          Assert.assertEquals(bs2, fb2);
      }
test_case.class_method_signature: PubchemFingerprinterTest.testMultithreadedUsage()
test_case.full_signature: @Test public void testMultithreadedUsage()
test_case.identifier: testMultithreadedUsage
test_case.invocations: parseSmiles parseSmiles percieveAtomTypesAndConfigureAtoms percieveAtomTypesAndConfigureAtoms getInstance getBuilder addImplicitHydrogens convertImplicitToExplicitHydrogens apply cdkLegacy addImplicitHydrogens convertImplicitToExplicitHydrogens apply cdkLegacy getInstance asBitSet getBitFingerprint asBitSet getBitFingerprint getInstance asBitSet getBitFingerprint printStackTrace newFixedThreadPool add add invokeAll get get assertNotNull get get assertNotNull assertEquals assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testMultithreadedUsage()
focal_class.declarator: FP_SIZE = 881
focal_class.modifier: public static final
focal_class.original_string: public static final int FP_SIZE = 881;
focal_class.type: int
focal_class.var_name: FP_SIZE
focal_class.declarator: m_bits
focal_class.modifier: private
focal_class.original_string: private byte[]          m_bits;
focal_class.type: byte[]
focal_class.var_name: m_bits
focal_class.declarator: cache = new HashMap<>()
focal_class.modifier: private
focal_class.original_string: private Map<String,SmartsPattern> cache = new HashMap<>();
focal_class.type: Map<String,SmartsPattern>
focal_class.var_name: cache
focal_class.declarator: BASE64_LUT = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefghijklmnopqrstuvwxyz0123456789+/="
focal_class.modifier: private static
focal_class.original_string: private static String BASE64_LUT = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefghijklmnopqrstuvwxyz0123456789+/=";
focal_class.type: String
focal_class.var_name: BASE64_LUT
focal_class.declarator: BITCOUNT[] = {0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4,
              3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
              1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4,
              3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 1, 2, 2, 3, 2, 3, 3, 4,
              2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5,
              4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
              3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6,
              5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8}
focal_class.modifier: static final
focal_class.original_string: static final int BITCOUNT[] = {0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4,
              3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
              1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4,
              3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 1, 2, 2, 3, 2, 3, 3, 4,
              2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5,
              4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
              3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6,
              5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8};
focal_class.type: int
focal_class.var_name: BITCOUNT
focal_class.declarator: MASK[]     = {0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01}
focal_class.modifier: static final
focal_class.original_string: static final int MASK[]     = {0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01};
focal_class.type: int
focal_class.var_name: MASK
focal_class.file: descriptor/fingerprint/src/main/java/org/openscience/cdk/fingerprint/PubchemFingerprinter.java
focal_class.identifier: PubchemFingerprinter
focal_class.interfaces: implements IFingerprinter
focal_class.class_method_signature: PubchemFingerprinter.PubchemFingerprinter(IChemObjectBuilder builder)
focal_class.full_signature: public  PubchemFingerprinter(IChemObjectBuilder builder)
focal_class.identifier: PubchemFingerprinter
focal_class.modifiers: public
focal_class.parameters: (IChemObjectBuilder builder)
focal_class.signature:  PubchemFingerprinter(IChemObjectBuilder builder)
focal_class.class_method_signature: PubchemFingerprinter.getBitFingerprint(IAtomContainer atomContainer)
focal_class.full_signature: @Override public IBitFingerprint getBitFingerprint(IAtomContainer atomContainer)
focal_class.identifier: getBitFingerprint
focal_class.modifiers: @Override public
focal_class.parameters: (IAtomContainer atomContainer)
focal_class.return: IBitFingerprint
focal_class.signature: IBitFingerprint getBitFingerprint(IAtomContainer atomContainer)
focal_class.class_method_signature: PubchemFingerprinter.getRawFingerprint(IAtomContainer iAtomContainer)
focal_class.full_signature: @Override public Map<String, Integer> getRawFingerprint(IAtomContainer iAtomContainer)
focal_class.identifier: getRawFingerprint
focal_class.modifiers: @Override public
focal_class.parameters: (IAtomContainer iAtomContainer)
focal_class.return: Map<String, Integer>
focal_class.signature: Map<String, Integer> getRawFingerprint(IAtomContainer iAtomContainer)
focal_class.class_method_signature: PubchemFingerprinter.getSize()
focal_class.full_signature: @Override public int getSize()
focal_class.identifier: getSize
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getSize()
focal_class.class_method_signature: PubchemFingerprinter._generateFp(byte[] fp, IAtomContainer mol)
focal_class.full_signature: private void _generateFp(byte[] fp, IAtomContainer mol)
focal_class.identifier: _generateFp
focal_class.modifiers: private
focal_class.parameters: (byte[] fp, IAtomContainer mol)
focal_class.return: void
focal_class.signature: void _generateFp(byte[] fp, IAtomContainer mol)
focal_class.class_method_signature: PubchemFingerprinter.generateFp(IAtomContainer mol)
focal_class.full_signature: private void generateFp(IAtomContainer mol)
focal_class.identifier: generateFp
focal_class.modifiers: private
focal_class.parameters: (IAtomContainer mol)
focal_class.return: void
focal_class.signature: void generateFp(IAtomContainer mol)
focal_class.class_method_signature: PubchemFingerprinter.isBitOn(int bit)
focal_class.full_signature: private boolean isBitOn(int bit)
focal_class.identifier: isBitOn
focal_class.modifiers: private
focal_class.parameters: (int bit)
focal_class.return: boolean
focal_class.signature: boolean isBitOn(int bit)
focal_class.class_method_signature: PubchemFingerprinter.getFingerprintAsBytes()
focal_class.full_signature: public byte[] getFingerprintAsBytes()
focal_class.identifier: getFingerprintAsBytes
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: byte[]
focal_class.signature: byte[] getFingerprintAsBytes()
focal_class.class_method_signature: PubchemFingerprinter.decode(String enc)
focal_class.full_signature: public static BitSet decode(String enc)
focal_class.identifier: decode
focal_class.modifiers: public static
focal_class.parameters: (String enc)
focal_class.return: BitSet
focal_class.signature: BitSet decode(String enc)
focal_class.class_method_signature: PubchemFingerprinter.encode()
focal_class.full_signature: private String encode()
focal_class.identifier: encode
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String encode()
focal_class.class_method_signature: PubchemFingerprinter.base64Encode(byte[] data)
focal_class.full_signature: private static String base64Encode(byte[] data)
focal_class.identifier: base64Encode
focal_class.modifiers: private static
focal_class.parameters: (byte[] data)
focal_class.return: String
focal_class.signature: String base64Encode(byte[] data)
focal_class.class_method_signature: PubchemFingerprinter.base64Decode(String data)
focal_class.full_signature: private static byte[] base64Decode(String data)
focal_class.identifier: base64Decode
focal_class.modifiers: private static
focal_class.parameters: (String data)
focal_class.return: byte[]
focal_class.signature: byte[] base64Decode(String data)
focal_class.class_method_signature: PubchemFingerprinter.countElements(byte[] fp, IAtomContainer mol)
focal_class.full_signature: private static void countElements(byte[] fp, IAtomContainer mol)
focal_class.identifier: countElements
focal_class.modifiers: private static
focal_class.parameters: (byte[] fp, IAtomContainer mol)
focal_class.return: void
focal_class.signature: void countElements(byte[] fp, IAtomContainer mol)
focal_class.class_method_signature: PubchemFingerprinter.countRings(byte[] fp, IAtomContainer mol)
focal_class.full_signature: private static void countRings(byte[] fp, IAtomContainer mol)
focal_class.identifier: countRings
focal_class.modifiers: private static
focal_class.parameters: (byte[] fp, IAtomContainer mol)
focal_class.return: void
focal_class.signature: void countRings(byte[] fp, IAtomContainer mol)
focal_class.class_method_signature: PubchemFingerprinter.countSubstructures(byte[] fp, IAtomContainer mol)
focal_class.full_signature: private void countSubstructures(byte[] fp, IAtomContainer mol)
focal_class.identifier: countSubstructures
focal_class.modifiers: private
focal_class.parameters: (byte[] fp, IAtomContainer mol)
focal_class.return: void
focal_class.signature: void countSubstructures(byte[] fp, IAtomContainer mol)
focal_class.class_method_signature: PubchemFingerprinter.getCountFingerprint(IAtomContainer container)
focal_class.full_signature: @Override public ICountFingerprint getCountFingerprint(IAtomContainer container)
focal_class.identifier: getCountFingerprint
focal_class.modifiers: @Override public
focal_class.parameters: (IAtomContainer container)
focal_class.return: ICountFingerprint
focal_class.signature: ICountFingerprint getCountFingerprint(IAtomContainer container)
focal_class.superclass: extends AbstractFingerprinter
focal_method.body: @Override
      public IBitFingerprint getBitFingerprint(IAtomContainer atomContainer) throws CDKException {
          generateFp(atomContainer);
          BitSet fp = new BitSet(FP_SIZE);
          for (int i = 0; i < FP_SIZE; i++) {
              if (isBitOn(i)) fp.set(i);
          }
          return new BitSetFingerprint(fp);
      }
focal_method.class_method_signature: PubchemFingerprinter.getBitFingerprint(IAtomContainer atomContainer)
focal_method.full_signature: @Override public IBitFingerprint getBitFingerprint(IAtomContainer atomContainer)
focal_method.identifier: getBitFingerprint
focal_method.invocations: generateFp isBitOn set
focal_method.modifiers: @Override public
focal_method.parameters: (IAtomContainer atomContainer)
focal_method.return: IBitFingerprint
focal_method.signature: IBitFingerprint getBitFingerprint(IAtomContainer atomContainer)