class HomolyticCleavageReaction extends ReactionEngine implements IReactionProcess {

    @Override
    public IReactionSet initiate(IAtomContainerSet reactants, IAtomContainerSet agents) throws CDKException {

        logger.debug("initiate reaction: HomolyticCleavageReaction");

        if (reactants.getAtomContainerCount() != 1) {
            throw new CDKException("HomolyticCleavageReaction only expects one reactant");
        }
        if (agents != null) {
            throw new CDKException("HomolyticCleavageReaction don't expects agents");
        }

        IReactionSet setOfReactions = reactants.getBuilder().newInstance(IReactionSet.class);
        IAtomContainer reactant = reactants.getAtomContainer(0);

        /*
         * if the parameter hasActiveCenter is not fixed yet, set the active
         * centers
         */
        IParameterReact ipr = super.getParameterClass(SetReactionCenter.class);
        if (ipr != null && !ipr.isSetParameter()) setActiveCenters(reactant);

        Iterator<IBond> bondis = reactant.bonds().iterator();
        while (bondis.hasNext()) {
            IBond bondi = bondis.next();
            IAtom atom1 = bondi.getBegin();
            IAtom atom2 = bondi.getEnd();
            if (bondi.getFlag(CDKConstants.REACTIVE_CENTER) && atom1.getFlag(CDKConstants.REACTIVE_CENTER)
                    && atom2.getFlag(CDKConstants.REACTIVE_CENTER)
                    && (atom1.getFormalCharge() == CDKConstants.UNSET ? 0 : atom1.getFormalCharge()) == 0
                    && (atom2.getFormalCharge() == CDKConstants.UNSET ? 0 : atom2.getFormalCharge()) == 0
                    && reactant.getConnectedSingleElectronsCount(atom1) == 0
                    && reactant.getConnectedSingleElectronsCount(atom2) == 0) {

                ArrayList<IAtom> atomList = new ArrayList<IAtom>();
                atomList.add(atom1);
                atomList.add(atom2);
                ArrayList<IBond> bondList = new ArrayList<IBond>();
                bondList.add(bondi);
                IAtomContainerSet moleculeSet = reactant.getBuilder().newInstance(IAtomContainerSet.class);
                moleculeSet.addAtomContainer(reactant);
                IReaction reaction = mechanism.initiate(moleculeSet, atomList, bondList);
                if (reaction == null)
                    continue;
                else
                    setOfReactions.addReaction(reaction);

            }

        }

        return setOfReactions;
    }

    public  HomolyticCleavageReaction();

}