LingoFingerprinter extends AbstractFingerprinter implements IFingerprinter { @Override public Map<String, Integer> getRawFingerprint(IAtomContainer atomContainer) throws CDKException { aromaticity.apply(atomContainer); final String smiles = replaceDigits(gen.create(atomContainer)); final Map<String, Integer> map = new HashMap<String, Integer>(); for (int i = 0, l = smiles.length() - n + 1; i < l; i++) { String subsmi = smiles.substring(i, i + n); Integer count = map.get(subsmi); if (count == null) map.put(subsmi, 1); else map.put(subsmi, count + 1); } return map; } LingoFingerprinter();  LingoFingerprinter(int n); @Override IBitFingerprint getBitFingerprint(IAtomContainer iAtomContainer); @Override Map<String, Integer> getRawFingerprint(IAtomContainer atomContainer); @Override int getSize(); @Override ICountFingerprint getCountFingerprint(IAtomContainer container);  }
@Test @Override public void testGetRawFingerprint() throws Exception { LingoFingerprinter lfp = new LingoFingerprinter(3); SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance()); IAtomContainer mol = sp.parseSmiles("SPONC"); Map<String, Integer> map = lfp.getRawFingerprint(mol); Assert.assertEquals(3, map.size()); String[] subs = {"PON", "ONC", "SPO"}; for (String s : subs) Assert.assertTrue(map.containsKey(s)); }