/* 3-state model for tRNA charging cycles for all 20 amino acids including synthetase sequestration: tRNA is uncharged and empty (state 0) --> synthetase is bound to tRNA (state 1) --> tRNA is charged with amino acid (state 2) transitions: 0 --> 1 binding: depends on the enzymatic concentration E of the synthetase, the doxycycling concentration and the number of uncharged tRNAs of this type 1 --> 2 charging: depends on the number of bound tRNAs, rate constant is affiliated with kcat, the chargin process does NOT depend on doxycycline (Decoupling) 2 --> 0 usage: depends on the number of charged tRNAs (corresponds to hopping rate of ribosome in the GTM) and via a feedback factor on doxycycline which reflects that doxycycline reduces the growth rate, i.e., the ribosomal current which is connected to the usage rate for ALL tRNAs (Coupling) This model does not distinguish between the different tRNAs which are served by the same amino acid and therefore, competition is ruled out here. */ //#################################################################################### #include #include #include #include #include #include "mtt.c" // from http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html //#################################################################################### //CONSTANTS //#################################################################################### #define STATEMAX 3 //number of states per cycle #define TRANSMAX 4 //number of transitions #define CYCLEMAX 20 //number of cycles, here: only GLN #define GLN 5 // index of glutamin #define STEPS 10000000000//Gillespie steps //#define STEPS 10000000//Gillespie steps, too small! #define SCALE 1 //scales all synthesases to system size; cellsize=1 #define CHARGE 10490 //scales all tRNA copy numbers to sysytem size; cellsize=10490 #define HOPP 0.1 //rate constant for "uncharging" (=usage) rate; cellsize=0.1 #define allcharged 1.0 // 1.0: all tRNAs initially charged; (1.0-allcharged)=uncharged; #define k0 43.0 //degredation rate constant #define k1phys 0.007 //physiological binding rate for the whole cell (=1.2*10^8 1/(sM)) #define CHARGEFACTOR 0.2 //scales the charging rate so that we get Q=80% inital charging for no doxy #define construct 4 //Gln4 strain construct has ca. 4 times more Gln synthetase cp to physiological level #define kcat_factor 1.0 // tuning the kcat-values: 1.0=physiological value; 0.1=small, 10=large //#################################################################################### //#################################################################################### //#################################################################################### //MAIN //#################################################################################### //#################################################################################### //#################################################################################### int main(int argc, char *argv[]) { time_t start,end; time(&start); long int t0=0;//t0 counts number of iterations (i.e. reactions) double r1,r2,tau,a0,runtime,randReaction;// random numbers, dwell time, initial sum of propensities, time, random reaction choosing value; double suma=0.0;// sum of propensities int i,j,cycle,state; //counter int deg=0; //identifies if transition is usage (=0) or degredation (deg=1); int correctcycle=0; int correctstate=0; long int Transient; double real_t;// realtime t-timetransient rounded double time_Transient; int THRESHOLD; int syn[CYCLEMAX],Etotal[CYCLEMAX],E[CYCLEMAX],copies[CYCLEMAX];//synthetase cell, synthetase small sysytem, GCN of tRNAs int t[CYCLEMAX],c[CYCLEMAX],b[CYCLEMAX],u[CYCLEMAX],dummy_aa, dummy_tRNA, dummy_codon; //number of tRNAs: total, charged, bound, uncharged, dummies; double kcat[CYCLEMAX],doxy[CYCLEMAX],doxyCH[CYCLEMAX];//kcat, doxycycling induced downscaling factor for E in binding rate, doxycycline induced downscaling factor for E in charging rate double BIND[CYCLEMAX],USE[CYCLEMAX];//binding rate constant, usage rate constant double w[CYCLEMAX][TRANSMAX], trans[CYCLEMAX][TRANSMAX], sum_trans[CYCLEMAX],accum_trans[CYCLEMAX];//propensities double mean_u[CYCLEMAX],mean_b[CYCLEMAX],mean_c[CYCLEMAX]; //mean values (over time): uncharged, bound, charged levels of tRNAs double k1[CYCLEMAX],k2[CYCLEMAX],k3;//rate constants double sum_w=0.0; double sum_before=0.0; FILE *f1p, *f2p, *f3p, *f4p; char string1[100],string2[100],string3[100],string4[100]; sprintf(string3,"mkdir OUTPUT_SynSeq"); system(string3); //#################################################################################### //LOOP //#################################################################################### double d=1.0;//doxyscale double FB; //feedback factor, connects the doxy reduction on the growth rate to the usage rate Transient=STEPS; int arg_d; for(arg_d=0;arg_d<27;arg_d++){ //doxy-loop for non-cluster run if(arg_d==0) d= 0.01 ; else if (arg_d==1) d= 0.012 ; else if (arg_d==2) d= 0.014 ; else if (arg_d==3) d= 0.016 ; else if (arg_d==4) d= 0.018 ; else if (arg_d==5) d= 0.02 ; else if (arg_d==6) d= 0.03 ; else if (arg_d==7) d= 0.04 ; else if (arg_d==8) d= 0.05 ; else if (arg_d==9) d= 0.06 ; else if (arg_d==10) d= 0.07 ; else if (arg_d==11) d= 0.08 ; else if (arg_d==12) d= 0.09 ; else if (arg_d==13) d= 0.1 ; else if (arg_d==14) d= 0.12 ; else if (arg_d==15) d= 0.14 ; else if (arg_d==16) d= 0.16 ; else if (arg_d==17) d= 0.18 ; else if (arg_d==18) d= 0.2 ; else if (arg_d==19) d= 0.3 ; else if (arg_d==20) d= 0.4 ; else if (arg_d==21) d= 0.5 ; else if (arg_d==22) d= 0.6 ; else if (arg_d==23) d= 0.7 ; else if (arg_d==24) d= 0.8 ; else if (arg_d==25) d= 0.9 ; else if (arg_d==26) d= 1.0 ; else printf("ERROR with d"); //#################################################################################### //INITIATION //#################################################################################### for(j=0;j=0) E[j]=Etotal[j]-b[j]; //number of free synthetase else {printf("Etotal=%d<0!!!\n",Etotal[j]); E[j]=0;} } //transition rates for(j=0; j 1 (Synthetase bound) w[j][1]=k2[j]*b[j]; //charging transition from state 1 (Synthetase bound) -> 2 (charged tRNA) w[j][2]=k3*c[j]; //usage (=uncharging) transition from state 2 (charged tRNA) -> 0 (empty tRNA) w[j][3]=k0*b[j]; //dissociation of the bound complex for(i=0;iTransient && THRESHOLD==0) { time_Transient=runtime;//real transient time THRESHOLD=1; } a0=0.0; //sum up all propensities for(i=0; i=trans[j][2]+sum_before && r2 =trans[j][1]+trans[j][2]+sum_before && r2< trans[j][2]+trans[j][1]+trans[j][0]+sum_before){state=0;cycle=j;break;} else if(r2>= trans[j][2]+trans[j][1]+trans[j][0]+sum_before && r2=accum_trans[CYCLEMAX-1]) printf("ERROR choosing: r2=%f>%f\n",r2,accum_trans[CYCLEMAX-1]); } //###################################################################################### //UPDATE mean levels //############################################################################################ if(t0>Transient) {//after transient time for(j=0;jt[cycle]) printf("ERROR state 0\n"); } else if(state==1) //bound tRNA gets charged { b[cycle]--; E[cycle]++; c[cycle]++; if(b[cycle]<0 || c[cycle]>t[cycle]) printf("ERROR state 1\n"); } else if(state==2) //charged tRNA used or complex dissociation { if(deg==0) c[cycle]--; //usage else {b[cycle]--; E[cycle]++;} //dissociated u[cycle]++; if(c[cycle]<0 || b[cycle]<0 || u[cycle]>t[cycle]) printf("ERROR state 2\n"); } else printf("ERROR states\n"); if(E[j]<0) printf("ERROR: E<0\n");//debugg //############################################################################################ //UPDATE propensities: //############################################################################################ w[cycle][0]=k1[cycle]*E[cycle]*u[cycle]; //binding transition w[cycle][1]=k2[cycle]*b[cycle]; //charging transition w[cycle][2]=k3*c[cycle]; //usage transition w[cycle][3]=k0*b[cycle]; //dissociation //############################################################################################ //UPDATE sum propensities //############################################################################################ //reset sums a0=0.0; sum_w=0; for(j=0; j