VFlibTurboHandler extends AbstractSubGraph implements IMCSBase { @Override public Map<Integer, Integer> getFirstMapping() { return Collections.unmodifiableMap(firstMCS); } VFlibTurboHandler(); @Override void set(MolHandler reactant, MolHandler product); @Override void set(IQueryAtomContainer source, IAtomContainer target); @Override List<Map<IAtom, IAtom>> getAllAtomMapping(); @Override List<Map<Integer, Integer>> getAllMapping(); @Override Map<IAtom, IAtom> getFirstAtomMapping(); @Override Map<Integer, Integer> getFirstMapping(); @Override boolean isSubgraph(boolean shouldMatchBonds); boolean isBondMatchFlag(); void setBondMatchFlag(boolean shouldMatchBonds);  }
@Test public void testGetFirstMapping() throws InvalidSmilesException { SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance()); IAtomContainer target = sp.parseSmiles("C\\C=C/Nc1cccc(c1)N(O)\\C=C\\C\\C=C\\C=C/C"); IAtomContainer queryac = sp.parseSmiles("Nc1ccccc1"); VFlibSubStructureHandler smsd1 = new VFlibSubStructureHandler(); MolHandler mol1 = new MolHandler(queryac, true, true); MolHandler mol2 = new MolHandler(target, true, true); smsd1.set(mol1, mol2); smsd1.isSubgraph(true); assertEquals(7, smsd1.getFirstMapping().size()); }