SubstructureFingerprinter extends AbstractFingerprinter implements IFingerprinter { public String getSubstructure(int bitIndex) { return keys.get(bitIndex).smarts; } SubstructureFingerprinter(String[] smarts);  SubstructureFingerprinter(); @Override IBitFingerprint getBitFingerprint(IAtomContainer atomContainer); @Override ICountFingerprint getCountFingerprint(IAtomContainer atomContainer); @Override Map<String, Integer> getRawFingerprint(IAtomContainer iAtomContainer); @Override int getSize(); String getSubstructure(int bitIndex);  }
@Test public void testGetSubstructure() throws Exception { String[] smarts = {"c1ccccc1", "[CX4H3][#6]", "[CX2]#[CX2]"}; SubstructureFingerprinter printer = new SubstructureFingerprinter(smarts); Assert.assertEquals(printer.getSubstructure(1), smarts[1]); }