test_class.file: descriptor/fingerprint/src/test/java/org/openscience/cdk/fingerprint/SubstructureFingerprinterTest.java
test_class.identifier: SubstructureFingerprinterTest
test_class.superclass: extends AbstractFixedLengthFingerprinterTest
test_case.body: @Test
      public void testCountableMACCSBinary_Rings() throws Exception {
          SmilesParser parser = new SmilesParser(SilentChemObjectBuilder.getInstance());
          IFingerprinter printer = new SubstructureFingerprinter(StandardSubstructureSets.getCountableMACCSSMARTS());
          IAtomContainer mol;
          BitSet bs;
  
          // Aromatic 6-rings
          mol = parser.parseSmiles("C1=CC=CC(=C1)CCCC2=CC=CC=C2");
          AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol);
          Aromaticity.cdkLegacy().apply(mol);
          bs = printer.getBitFingerprint(mol).asBitSet();
  
          Assert.assertTrue(bs.get(128)); // 6-ring
          Assert.assertTrue(bs.get(111)); // aromaticity
  
          Assert.assertFalse(bs.get(7)); // 7-ring
          Assert.assertFalse(bs.get(82)); // 5-ring
  
          // Non-aromatic 6-rings
          mol = parser.parseSmiles("C1CC(CCC1)CCCCC2CCCCC2");
          AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol);
          Aromaticity.cdkLegacy().apply(mol);
          bs = printer.getBitFingerprint(mol).asBitSet();
  
          Assert.assertTrue(bs.get(128)); // 6-ring
  
          Assert.assertFalse(bs.get(111)); // aromaticity
          Assert.assertFalse(bs.get(7)); // 7-ring
          Assert.assertFalse(bs.get(82)); // 5-ring
  
          // Aromatic 6-ring, 3-ring and 4-ring
          mol = parser.parseSmiles("C1CC1C(CCC2CCC2)CC3=CC=CC=C3");
          AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol);
          Aromaticity.cdkLegacy().apply(mol);
          bs = printer.getBitFingerprint(mol).asBitSet();
  
          Assert.assertTrue(bs.get(128)); // 6-ring
          Assert.assertTrue(bs.get(111)); // aromaticity
          Assert.assertTrue(bs.get(10)); // 3-ring
          Assert.assertTrue(bs.get(1)); // 4-ring
  
          Assert.assertFalse(bs.get(7)); // 7-ring
          Assert.assertFalse(bs.get(82)); // 5-ring
  
          // Aromatic 6-ring, 3-ring and 4-ring
          mol = parser.parseSmiles("C1(CC1C(CCC2CCC2)CC3=CC=CC=C3)C(C(C(C4CC4)C5CC5)C6CC6)C7CC7");
          AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol);
          Aromaticity.cdkLegacy().apply(mol);
          bs = printer.getBitFingerprint(mol).asBitSet();
  
          Assert.assertTrue(bs.get(128)); // 6-ring
          Assert.assertTrue(bs.get(111)); // aromaticity
          Assert.assertTrue(bs.get(10)); // 3-ring
          Assert.assertTrue(bs.get(1)); // 4-ring
  
          Assert.assertFalse(bs.get(7)); // 7-ring
          Assert.assertFalse(bs.get(82)); // 5-ring
      }
test_case.class_method_signature: SubstructureFingerprinterTest.testCountableMACCSBinary_Rings()
test_case.full_signature: @Test public void testCountableMACCSBinary_Rings()
test_case.identifier: testCountableMACCSBinary_Rings
test_case.invocations: getInstance getCountableMACCSSMARTS parseSmiles percieveAtomTypesAndConfigureAtoms apply cdkLegacy asBitSet getBitFingerprint assertTrue get assertTrue get assertFalse get assertFalse get parseSmiles percieveAtomTypesAndConfigureAtoms apply cdkLegacy asBitSet getBitFingerprint assertTrue get assertFalse get assertFalse get assertFalse get parseSmiles percieveAtomTypesAndConfigureAtoms apply cdkLegacy asBitSet getBitFingerprint assertTrue get assertTrue get assertTrue get assertTrue get assertFalse get assertFalse get parseSmiles percieveAtomTypesAndConfigureAtoms apply cdkLegacy asBitSet getBitFingerprint assertTrue get assertTrue get assertTrue get assertTrue get assertFalse get assertFalse get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCountableMACCSBinary_Rings()
focal_class.declarator: keys = new ArrayList<>()
focal_class.modifier: private
focal_class.original_string: private List<Key> keys = new ArrayList<>();
focal_class.type: List<Key>
focal_class.var_name: keys
focal_class.file: descriptor/fingerprint/src/main/java/org/openscience/cdk/fingerprint/SubstructureFingerprinter.java
focal_class.identifier: SubstructureFingerprinter
focal_class.interfaces: implements IFingerprinter
focal_class.class_method_signature: SubstructureFingerprinter.SubstructureFingerprinter(String[] smarts)
focal_class.full_signature: public  SubstructureFingerprinter(String[] smarts)
focal_class.identifier: SubstructureFingerprinter
focal_class.modifiers: public
focal_class.parameters: (String[] smarts)
focal_class.signature:  SubstructureFingerprinter(String[] smarts)
focal_class.class_method_signature: SubstructureFingerprinter.SubstructureFingerprinter()
focal_class.full_signature: public  SubstructureFingerprinter()
focal_class.identifier: SubstructureFingerprinter
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  SubstructureFingerprinter()
focal_class.class_method_signature: SubstructureFingerprinter.setSmarts(String[] smarts)
focal_class.full_signature: private void setSmarts(String[] smarts)
focal_class.identifier: setSmarts
focal_class.modifiers: private
focal_class.parameters: (String[] smarts)
focal_class.return: void
focal_class.signature: void setSmarts(String[] smarts)
focal_class.class_method_signature: SubstructureFingerprinter.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: SubstructureFingerprinter.getCountFingerprint(IAtomContainer atomContainer)
focal_class.full_signature: @Override public ICountFingerprint getCountFingerprint(IAtomContainer atomContainer)
focal_class.identifier: getCountFingerprint
focal_class.modifiers: @Override public
focal_class.parameters: (IAtomContainer atomContainer)
focal_class.return: ICountFingerprint
focal_class.signature: ICountFingerprint getCountFingerprint(IAtomContainer atomContainer)
focal_class.class_method_signature: SubstructureFingerprinter.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: SubstructureFingerprinter.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: SubstructureFingerprinter.getSubstructure(int bitIndex)
focal_class.full_signature: public String getSubstructure(int bitIndex)
focal_class.identifier: getSubstructure
focal_class.modifiers: public
focal_class.parameters: (int bitIndex)
focal_class.return: String
focal_class.signature: String getSubstructure(int bitIndex)
focal_class.superclass: extends AbstractFingerprinter
focal_method.body: @Override
      public IBitFingerprint getBitFingerprint(IAtomContainer atomContainer) throws CDKException {
          if (keys.isEmpty()) {
              throw new CDKException("No substructures were defined");
          }
  
          SmartsPattern.prepare(atomContainer);
          BitSet fingerPrint = new BitSet(keys.size());
          for (int i = 0; i < keys.size(); i++) {
              if (keys.get(i).pattern.matches(atomContainer))
                  fingerPrint.set(i, true);
          }
          return new BitSetFingerprint(fingerPrint);
      }
focal_method.class_method_signature: SubstructureFingerprinter.getBitFingerprint(IAtomContainer atomContainer)
focal_method.full_signature: @Override public IBitFingerprint getBitFingerprint(IAtomContainer atomContainer)
focal_method.identifier: getBitFingerprint
focal_method.invocations: isEmpty prepare size size matches get set
focal_method.modifiers: @Override public
focal_method.parameters: (IAtomContainer atomContainer)
focal_method.return: IBitFingerprint
focal_method.signature: IBitFingerprint getBitFingerprint(IAtomContainer atomContainer)