# Biochem 721; Foster # gnuplot script for plotting the kinetics of a series reaction # A -> B -> C # d[A]/dt = k1[A]; integrating, we get: a(x) = a0*exp(-k1*x) # d[B]/dt = k1[A] - k2[B] = k1[A0]*exp(-k1*t) - k2[B]; integrating, we get: b(x) = ((k1*a0)/(k2-k1))*(exp(-k1*x)-exp(-k2*x)) # d[C]/dt = k2[B] = ((k1*k2*a0)/(k2-k1))(exp((k2-k1)*x)); integrating, we get: c(x) = a0*(1 - (1/(k2-k1))*((k2*exp(-k1*x)-k1*exp(-k2*x)))) # settings: set xlabel "Time" set ylabel "Concentration" a0 = 1. k1 = 1.1; k2 = 1. set title "k1 = k2" plot [0:10] a(x), b(x), c(x) print "k1 ~ k2" pause -1 "Return to continue..." k1 = 10.; k2 = 1. set title "k1 >> k2" plot [0:10] a(x), b(x), c(x) print "k1 >> k2" pause -1 "Return to continue..." k1 = 1.; k2 = 10. set title "k1 << k2" plot [0:10] a(x), b(x), c(x) print "k1 << k2" pause -1 "Return to continue..."