EStateFingerprinter extends AbstractFingerprinter implements IFingerprinter { @Override public IBitFingerprint getBitFingerprint(IAtomContainer atomContainer) throws CDKException { int bitsetLength = PATTERNS.length; BitSet fingerPrint = new BitSet(bitsetLength); SmartsPattern.prepare(atomContainer); for (int i = 0; i < PATTERNS.length; i++) { if (PATTERNS[i].matches(atomContainer)) fingerPrint.set(i, true); } return new BitSetFingerprint(fingerPrint); } EStateFingerprinter(); @Override IBitFingerprint getBitFingerprint(IAtomContainer atomContainer); @Override Map<String, Integer> getRawFingerprint(IAtomContainer iAtomContainer); @Override int getSize(); @Override ICountFingerprint getCountFingerprint(IAtomContainer container);  }
@Test @Override public void testBug706786() throws Exception { IAtomContainer superStructure = bug706786_1(); IAtomContainer subStructure = bug706786_2(); AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(superStructure); AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(subStructure); addImplicitHydrogens(superStructure); addImplicitHydrogens(subStructure); AtomContainerManipulator.suppressHydrogens(superStructure); AtomContainerManipulator.suppressHydrogens(subStructure); IFingerprinter fpr = new EStateFingerprinter(); IBitFingerprint superBits = fpr.getBitFingerprint(superStructure); IBitFingerprint subBits = fpr.getBitFingerprint(subStructure); assertThat(superBits.asBitSet(), is(asBitSet(6, 11, 12, 15, 16, 18, 33, 34, 35))); assertThat(subBits.asBitSet(), is(asBitSet(8, 11, 16, 35))); }