From cbfb8deec800cf8af770c916c743a5e0585e7b8a Mon Sep 17 00:00:00 2001 From: Dariusz Murakowski Date: Mon, 27 Apr 2015 16:33:10 -0400 Subject: [PATCH] Set up reactions for CTLs recognizing amino acids. --- ss.cpp | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/ss.cpp b/ss.cpp index 153b09c..c96e4f4 100644 --- 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; enum_ep; e++) { // XXX std::cout << M->affinity.back() << '\t'; for (size_t i=0; iepitopes[e].len; i++) { -- 2.7.4