/*! \brief This function build a new EnzymeReaction based on the given EnzymeReactionProprieties \param props The proprities class \return This function return a new EnzymeReaction or null if props is null. */ public static IReaction buildEnzymeReactionFromProps(EnzymeReactionProprieties props) { if (props == null) return null; EnzymeReaction reaction = new EnzymeReaction(); reaction.setName(props.name); reaction.setSubstrate(props.substrate); reaction.setEnzyme(props.enzyme); reaction.setKcat(props.Kcat); reaction.setEffector(props.effector); reaction.setAlpha(props.alpha); reaction.setBeta(props.beta); reaction.setKm(props.Km); reaction.setKi(props.Ki); reaction.setEnergyCost(props.energyCost); Product newProd; foreach (Product p in props.products) { newProd = new Product(p); reaction.addProduct(newProd); } return reaction; }
/*! * \brief This function build a new EnzymeReaction based on the given EnzymeReactionProperties * \param props The proprities class * \return This function return a new EnzymeReaction or null if props is null. */ public static IReaction buildEnzymeReactionFromProps(EnzymeReactionProperties props) { if (props == null) { return(null); } EnzymeReaction reaction = new EnzymeReaction(); reaction.setName(props.name); reaction.setSubstrate(props.substrate); reaction.setEnzyme(props.enzyme); reaction.setKcat(props.Kcat); reaction.setEffector(props.effector); reaction.setAlpha(props.alpha); reaction.setBeta(props.beta); reaction.setKm(props.Km); reaction.setKi(props.Ki); reaction.setEnergyCost(props.energyCost); Product newProd; foreach (Product p in props.products) { newProd = new Product(p); reaction.addProduct(newProd); } return(reaction); }