@Test public void testSearchMCS() { IAtom atomSource = new Atom("R"); IAtom atomTarget = new Atom("R"); IAtomContainer source = new AtomContainer(); source.addAtom(atomSource); IAtomContainer target = new AtomContainer(); target.addAtom(atomTarget); SingleMappingHandler instance = new SingleMappingHandler(source, target, false); Assert.assertNotNull(instance.getAllAtomMapping()); Assert.assertEquals(1, instance.getAllAtomMapping().size()); }
private synchronized void searchMCS() { SingleMapping singleMapping = new SingleMapping(); List<Map<IAtom, IAtom>> mappings = null; try { if (target instanceof IQueryAtomContainer) { throw new CDKException("Target can't be IQueryAtomContainer"); } else if (!(source instanceof IQueryAtomContainer)) { mappings = singleMapping.getOverLaps(source, target); } else { mappings = singleMapping.getOverLaps((IQueryAtomContainer) source, target); } } catch (CDKException ex) { Logger.error(Level.SEVERE, null, ex); } setAllAtomMapping(mappings); }
SingleMappingHandler implements IResults { private synchronized void searchMCS() { SingleMapping singleMapping = new SingleMapping(); List<Map<IAtom, IAtom>> mappings = null; try { if (target instanceof IQueryAtomContainer) { throw new CDKException("Target can't be IQueryAtomContainer"); } else if (!(source instanceof IQueryAtomContainer)) { mappings = singleMapping.getOverLaps(source, target); } else { mappings = singleMapping.getOverLaps((IQueryAtomContainer) source, target); } } catch (CDKException ex) { Logger.error(Level.SEVERE, null, ex); } setAllAtomMapping(mappings); } }
SingleMappingHandler implements IResults { private synchronized void searchMCS() { SingleMapping singleMapping = new SingleMapping(); List<Map<IAtom, IAtom>> mappings = null; try { if (target instanceof IQueryAtomContainer) { throw new CDKException("Target can't be IQueryAtomContainer"); } else if (!(source instanceof IQueryAtomContainer)) { mappings = singleMapping.getOverLaps(source, target); } else { mappings = singleMapping.getOverLaps((IQueryAtomContainer) source, target); } } catch (CDKException ex) { Logger.error(Level.SEVERE, null, ex); } setAllAtomMapping(mappings); } SingleMappingHandler(
            IAtomContainer source, 
            IAtomContainer target, 
            boolean shouldMatchRings);  SingleMappingHandler(
            IQueryAtomContainer source, 
            IAtomContainer target); }
SingleMappingHandler implements IResults { private synchronized void searchMCS() { SingleMapping singleMapping = new SingleMapping(); List<Map<IAtom, IAtom>> mappings = null; try { if (target instanceof IQueryAtomContainer) { throw new CDKException("Target can't be IQueryAtomContainer"); } else if (!(source instanceof IQueryAtomContainer)) { mappings = singleMapping.getOverLaps(source, target); } else { mappings = singleMapping.getOverLaps((IQueryAtomContainer) source, target); } } catch (CDKException ex) { Logger.error(Level.SEVERE, null, ex); } setAllAtomMapping(mappings); } SingleMappingHandler(
            IAtomContainer source, 
            IAtomContainer target, 
            boolean shouldMatchRings);  SingleMappingHandler(
            IQueryAtomContainer source, 
            IAtomContainer target); @Override synchronized List<AtomAtomMapping> getAllAtomMapping(); @Override synchronized AtomAtomMapping getFirstAtomMapping(); }
SingleMappingHandler implements IResults { private synchronized void searchMCS() { SingleMapping singleMapping = new SingleMapping(); List<Map<IAtom, IAtom>> mappings = null; try { if (target instanceof IQueryAtomContainer) { throw new CDKException("Target can't be IQueryAtomContainer"); } else if (!(source instanceof IQueryAtomContainer)) { mappings = singleMapping.getOverLaps(source, target); } else { mappings = singleMapping.getOverLaps((IQueryAtomContainer) source, target); } } catch (CDKException ex) { Logger.error(Level.SEVERE, null, ex); } setAllAtomMapping(mappings); } SingleMappingHandler(
            IAtomContainer source, 
            IAtomContainer target, 
            boolean shouldMatchRings);  SingleMappingHandler(
            IQueryAtomContainer source, 
            IAtomContainer target); @Override synchronized List<AtomAtomMapping> getAllAtomMapping(); @Override synchronized AtomAtomMapping getFirstAtomMapping();  }