class AdductionProtonPBReaction extends ReactionEngine implements IReactionProcess {

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

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

        if (reactants.getAtomContainerCount() != 1) {
            throw new CDKException("AdductionProtonPBReaction only expects one reactant");
        }
        if (agents != null) {
            throw new CDKException("AdductionProtonPBReaction 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);

        if (AtomContainerManipulator.getTotalCharge(reactant) != 0) return setOfReactions;

        Iterator<IBond> bondis = reactant.bonds().iterator();
        while (bondis.hasNext()) {
            IBond bondi = bondis.next();

            if (bondi.getFlag(CDKConstants.REACTIVE_CENTER)
                    && ((bondi.getOrder() == IBond.Order.DOUBLE) || (bondi.getOrder() == IBond.Order.TRIPLE))
                    && bondi.getBegin().getFlag(CDKConstants.REACTIVE_CENTER)
                    && bondi.getEnd().getFlag(CDKConstants.REACTIVE_CENTER)) {
                int chargeAtom0 = bondi.getBegin().getFormalCharge() == null ? 0 : bondi.getBegin().getFormalCharge();
                int chargeAtom1 = bondi.getEnd().getFormalCharge() == null ? 0 : bondi.getEnd().getFormalCharge();
                if (chargeAtom0 >= 0 && chargeAtom1 >= 0
                        && reactant.getConnectedSingleElectronsCount(bondi.getBegin()) == 0
                        && reactant.getConnectedSingleElectronsCount(bondi.getEnd()) == 0
                        && reactant.getConnectedLonePairsCount(bondi.getBegin()) == 0
                        && reactant.getConnectedLonePairsCount(bondi.getEnd()) == 0) {

                    /**/
                    for (int j = 0; j < 2; j++) {

                        ArrayList<IAtom> atomList = new ArrayList<IAtom>();
                        if (j == 0) {
                            atomList.add(bondi.getBegin());
                            atomList.add(bondi.getEnd());
                        } else {
                            atomList.add(bondi.getEnd());
                            atomList.add(bondi.getBegin());
                        }
                        IAtom atomH = reactant.getBuilder().newInstance(IAtom.class, "H");
                        atomH.setFormalCharge(1);
                        atomList.add(atomH);

                        ArrayList<IBond> bondList = new ArrayList<IBond>();
                        bondList.add(bondi);

                        IAtomContainerSet moleculeSet = reactant.getBuilder().newInstance(IAtomContainerSet.class);
                        moleculeSet.addAtomContainer(reactant);
                        IAtomContainer adduct = reactant.getBuilder().newInstance(IAtomContainer.class);
                        adduct.addAtom(atomH);
                        moleculeSet.addAtomContainer(adduct);

                        IReaction reaction = mechanism.initiate(moleculeSet, atomList, bondList);
                        if (reaction == null)
                            continue;
                        else
                            setOfReactions.addReaction(reaction);

                    }

                }

            }
        }

        return setOfReactions;
    }

    public  AdductionProtonPBReaction();

}