Esempio n. 1
0
    /*!
     * \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);
    }
Esempio n. 2
0
  /*!
    \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;
  }