MCSPlusHandler extends AbstractMCSAlgorithm implements IMCSBase { @Override public synchronized Map<IAtom, IAtom> getFirstAtomMapping() { return atomsMCS; } MCSPlusHandler(); @Override synchronized void set(MolHandler source, MolHandler target); @Override void set(IQueryAtomContainer source, IAtomContainer target); @Override synchronized void searchMCS(boolean shouldMatchBonds); @Override synchronized List<Map<Integer, Integer>> getAllMapping(); @Override synchronized Map<Integer, Integer> getFirstMapping(); @Override synchronized List<Map<IAtom, IAtom>> getAllAtomMapping(); @Override synchronized Map<IAtom, IAtom> getFirstAtomMapping();  }
@Test public void testGetFirstAtomMapping() 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"); MCSPlusHandler smsd1 = new MCSPlusHandler(); MolHandler mol1 = new MolHandler(queryac, true, true); MolHandler mol2 = new MolHandler(target, true, true); smsd1.set(mol1, mol2); smsd1.searchMCS(true); assertNotNull(smsd1.getFirstMapping()); assertEquals(7, smsd1.getFirstAtomMapping().size()); }