Package vsv

Examples of vsv.Cell


    Vector<Double> resultsTranscripts = new Vector<Double>();
    Vector<Double> resultsProteins = new Vector<Double>();
    Vector<Double> time = new Vector<Double>();
   
    // Initialize Cell Amounts
    Cell cell = new Cell();
    cell.templates.initialize(new Item("Template", templates, 0.0));
    cell.proteins.initialize(new Item("Rib", ribosomes, 0.0));
    cell.proteins.initialize(new Item("Pol", polymerases, 0.0));
   
    Vector<Reaction> rxns = new Vector<Reaction>();
   
    // Add reactions
    TestPolymeraseRxn transcription = new TestPolymeraseRxn(cell.templates, "Template", cell.proteins, "Pol", kms, transcriptDelay, cell.transcripts);
    TestPolymeraseRxn translation = new TestPolymeraseRxn(cell.transcripts, "Template", cell.proteins, "Rib", ksp, proteinDelay, cell.proteins);
    rxns.add(transcription);
    rxns.add(translation);
    LSVList reactions = new LSVList();
    reactions.add("Reactions");
    for (Reaction r : rxns)
    {
      reactions.add(r.toString());
    }
    Recorder.log(reactions.toString(), "Tester");
   
    double t = 0;
    while (t <= tf)
    {
      // Add matured items to the pool
      cell.mature(t);
     
      if(t % dtRecord == 0)
      {
        resultsTranscripts.add(cell.transcripts.getCount("Template"));
        resultsProteins.add(cell.proteins.getCount("Template"));
        time.add(t);
      }
     
      // calculate rates based on each reaction in the simulation
      for (Reaction rxn : rxns)
      {
        rxn.calculateBaseRate();
        rxn.applyStoichAndRate();
      }
      cell.simpleLinearIntegrate(dt, t, 1);
     
      t = t + dt;
    }
   
    if(plot)
View Full Code Here

TOP

Related Classes of vsv.Cell

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.