Ejemplo n.º 1
0
  public void setup() {
    clear();
    Protein protein = gene.getProtein();
    if (aminoAcid != null) addSubstance(aminoAcid, -1.0);
    addSubstance(gene.getRibosome(), 0.0);
    addSubstance(protein, 3.0 / (gene.getLength()));
    rateExpression =
        DMath.multiply(
            gene.getRibosome().getElongationRate(),
            DMath.min(
                DMath.multiply(
                    gene.getRibosome(),
                    DMath.divide(
                        DMath.multiply(gene.getKTranslation(), gene.getRna()),
                        gene.getRibosome().getTotalTranslationActivity())),
                //
                // the maximum # of ribosomes that can be allocated to a
                // gene
                // is the gene length divided by the ribosome spacing
                // requirement.
                //
                DMath.divide(
                    DMath.multiply(new Constant(gene.getLength() / 3.0), gene.getRna()),
                    gene.getRibosome().getSpacing())));
    //
    // hack: used to make sure that when aminoAcid is set, the rate should
    // be zero
    // when amino acids are all consumed.
    //
    // better implementation is by using the MichaelisMenten reaction
    // scheme, but
    // it needs an additional parameter.
    //

    if (aminoAcid != null)
      rateExpression =
          DMath.multiply(
              rateExpression, DMath.divide(aminoAcid, DMath.sum(aminoAcid, new Constant(1e4))));
  }