protected IAtomContainerSet getUncommon(IAtomContainer mol, IAtomContainer mcss, boolean shouldMatchBonds)
            throws CDKException {
        ArrayList<Integer> atomSerialsToDelete = new ArrayList<Integer>();

        List<List<CDKRMap>> matches = CDKMCS.getSubgraphAtomsMaps(mol, mcss, shouldMatchBonds);
        List<CDKRMap> mapList = matches.get(0);
        for (Object o : mapList) {
            CDKRMap rmap = (CDKRMap) o;
            atomSerialsToDelete.add(rmap.getId1());
        }

        // at this point we have the serial numbers of the bonds to delete
        // we should get the actual bonds rather than delete by serial numbers
        ArrayList<IAtom> atomsToDelete = new ArrayList<IAtom>();
        for (Integer serial : atomSerialsToDelete) {
            atomsToDelete.add(mol.getAtom(serial));
        }

        // now lets get rid of the bonds themselves
        for (IAtom atom : atomsToDelete) {
            mol.removeAtom(atom);
        }

        // now we probably have a set of disconnected components
        // so lets get a set of individual atom containers for
        // corresponding to each component
        return ConnectivityChecker.partitionIntoMolecules(mol);
    }
protected IAtomContainerSet getUncommon ( IAtomContainer mol , IAtomContainer mcss , boolean shouldMatchBonds ) throws CDKException { ArrayList < Integer > atomSerialsToDelete = new ArrayList < Integer > ( ) ; List < List < CDKRMap > > matches = CDKMCS . getSubgraphAtomsMaps ( mol , mcss , shouldMatchBonds ) ; List < CDKRMap > mapList = matches . get ( 0 ) ; for ( Object o : mapList ) { CDKRMap rmap = ( CDKRMap ) o ; atomSerialsToDelete . add ( rmap . getId1 ( ) ) ; } ArrayList < IAtom > atomsToDelete = new ArrayList < IAtom > ( ) ; for ( Integer serial : atomSerialsToDelete ) { atomsToDelete . add ( mol . getAtom ( serial ) ) ; } for ( IAtom atom : atomsToDelete ) { mol . removeAtom ( atom ) ; } return ConnectivityChecker . partitionIntoMolecules ( mol ) ; }
@param mol
@param mcss
@param shouldMatchBonds
@return IMolecule Set
@throws CDKException