private IAtom getAnotherUnsaturatedNode(IAtom exclusionAtom,
                                            IAtomContainer exclusionAtomContainer,
                                            IAtomContainerSet atomContainers) throws CDKException {
        IAtom atom;

        for (IAtomContainer ac : atomContainers.atomContainers()) {
            if (ac != exclusionAtomContainer) {
                int next = 0;//(int) (Math.random() * ac.getAtomCount());
                for (int f = next; f < ac.getAtomCount(); f++) {
                    atom = ac.getAtom(f);
                    if (!satCheck.isSaturated(atom, ac) && exclusionAtom != atom) {
                        return atom;
                    }
                }
            }
        }

        int next = exclusionAtomContainer.getAtomCount();//(int) (Math.random() * ac.getAtomCount());
        for (int f = 0; f < next; f++) {
            atom = exclusionAtomContainer.getAtom(f);
            if (!satCheck.isSaturated(atom, exclusionAtomContainer) && exclusionAtom != atom
                && !exclusionAtomContainer.getConnectedAtomsList(exclusionAtom).contains(atom)) {
                return atom;
            }
        }

        return null;
    }
private IAtom getAnotherUnsaturatedNode ( IAtom exclusionAtom , IAtomContainer exclusionAtomContainer , IAtomContainerSet atomContainers ) throws CDKException { IAtom atom ; for ( IAtomContainer ac : atomContainers . atomContainers ( ) ) { if ( ac != exclusionAtomContainer ) { int next = 0 ; for ( int f = next ; f < ac . getAtomCount ( ) ; f ++ ) { atom = ac . getAtom ( f ) ; if ( ! satCheck . isSaturated ( atom , ac ) && exclusionAtom != atom ) { return atom ; } } } } int next = exclusionAtomContainer . getAtomCount ( ) ; for ( int f = 0 ; f < next ; f ++ ) { atom = exclusionAtomContainer . getAtom ( f ) ; if ( ! satCheck . isSaturated ( atom , exclusionAtomContainer ) && exclusionAtom != atom && ! exclusionAtomContainer . getConnectedAtomsList ( exclusionAtom ) . contains ( atom ) ) { return atom ; } } return null ; }
Gets a randomly selected unsaturated atom from the set. If there are any, it will be from another
container than exclusionAtom.

@return  The unsaturated atom.