CDKMCSHandler extends AbstractMCSAlgorithm implements IMCSBase { @Override public List<Map<IAtom, IAtom>> getAllAtomMapping() { return Collections.unmodifiableList(allAtomMCS); } CDKMCSHandler(); @Override void set(MolHandler source, MolHandler target); @Override void set(IQueryAtomContainer source, IAtomContainer target); @Override void searchMCS(boolean shouldMatchBonds); @Override List<Map<Integer, Integer>> getAllMapping(); @Override Map<Integer, Integer> getFirstMapping(); @Override List<Map<IAtom, IAtom>> getAllAtomMapping(); @Override Map<IAtom, IAtom> getFirstAtomMapping();  }
@Test public void testGetAllAtomMapping() 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"); CDKMCSHandler smsd1 = new CDKMCSHandler(); 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(4, smsd1.getAllAtomMapping().size()); }