Set up reactions for CTLs recognizing amino acids.
authorDariusz Murakowski <murakdar@mit.edu>
Mon, 27 Apr 2015 20:33:10 +0000 (16:33 -0400)
committerDariusz Murakowski <murakdar@mit.edu>
Mon, 27 Apr 2015 20:33:10 +0000 (16:33 -0400)
ss.cpp

diff --git a/ss.cpp b/ss.cpp
index 153b09c..c96e4f4 100644 (file)
--- a/ss.cpp
+++ b/ss.cpp
@@ -606,6 +606,78 @@ void importEpitope_Potts(RunParameters_SS &r, Species_parray &species, Rxn_parra
 
         }
 
+        species.push_back(M);   // memory
+
+        CTLaaSpecies* N = new CTLaaSpecies(*M);     // naive
+        N->name = "N";  N->count = r.init_CTL_numN[i];
+        species.push_back(N);
+
+        CTLaaSpecies* T = new CTLaaSpecies(*M);     // effector
+        T->name = "T";  T->count = r.init_CTL_numT[i];
+        species.push_back(T);
+
+        print_spec.push_back(T);
+        print_spec.push_back(N);
+        print_spec.push_back(M);
+
+        {   // p
+            AAKillingReaction* rx = new AAKillingReaction(r.rate_p);
+            rx->T = T;  rx->V = V;
+            reactions.push_back(rx);
+        }
+        {   // a
+            CTLaaActivationReaction* rx = new CTLaaActivationReaction(r.rate_a);
+            rx->Tfrom = N;  rx->Tto = T;  rx->V = V;
+            reactions.push_back(rx);
+        }
+        {   // r
+            ElementaryReaction* rx = new ElementaryReaction(r.rate_r);
+            rx->reactants.push_back(T); rx->reactant_stoich.push_back(1);
+            rx->products.push_back(T); rx->product_stoich.push_back(1);
+            reactions.push_back(rx);
+        }
+        {   // d = 0.5  // note d' = 3.0
+            ElementaryReaction* rx = new ElementaryReaction(r.rate_dprime);
+            rx->reactants.push_back(T); rx->reactant_stoich.push_back(1);
+            rx->products.push_back(T); rx->product_stoich.push_back(-1);
+            reactions.push_back(rx);
+        }
+        {   // b
+            ElementaryReaction* rx = new ElementaryReaction(r.rate_b);
+            rx->reactants.push_back(N); rx->reactant_stoich.push_back(1);
+            rx->products.push_back(N); rx->product_stoich.push_back(1);
+            reactions.push_back(rx);
+        }
+        {   // e
+            ElementaryReaction* rx = new ElementaryReaction(r.rate_e);
+            rx->reactants.push_back(N); rx->reactant_stoich.push_back(1);
+            rx->products.push_back(N); rx->product_stoich.push_back(-1);
+            reactions.push_back(rx);
+        }
+        {   // w
+            ElementaryReaction* rx = new ElementaryReaction(r.rate_w);
+            rx->products.push_back(N); rx->product_stoich.push_back(1);
+            reactions.push_back(rx);
+        }
+        {   // a'
+            CTLaaActivationReaction* rx = new CTLaaActivationReaction(r.rate_aprime);
+            rx->Tfrom = M;  rx->Tto = T;  rx->V = V;
+            reactions.push_back(rx);
+        }
+        {   // g
+            ElementaryReaction* rx = new ElementaryReaction(r.rate_g);
+            rx->reactants.push_back(T); rx->reactant_stoich.push_back(1);
+            rx->products.push_back(T); rx->product_stoich.push_back(-1);
+            rx->products.push_back(M); rx->product_stoich.push_back(1);
+            reactions.push_back(rx);
+        }
+        {   // h
+            ElementaryReaction* rx = new ElementaryReaction(r.rate_h);
+            rx->reactants.push_back(M); rx->reactant_stoich.push_back(1);
+            rx->products.push_back(M); rx->product_stoich.push_back(-1);
+            reactions.push_back(rx);
+        }
+
         for (size_t e=0; e<M->num_ep; e++) {    // XXX
             std::cout << M->affinity.back() << '\t';
             for (size_t i=0; i<M->epitopes[e].len; i++) {