1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
|
// Physical properties
create a
access a
// {nseg=1 insert capump}
{nseg=1 insert capr}
cao=2
// run parameters
tstop=40
// simulation control
proc init() { local tausav, done
done = 0
forall if (ismembrane("capr") && done==0) {
tausav = tau_capr
tau_capr = 1e-6 // so cai tracks car closely during initialization
car_capr = cai0
done = 1
}
finitialize(0)
done = 0
forall if (ismembrane("capr") && done==0) {
tau_capr = tausav
done = 1
}
// must re-initialize cvode after abrupt parameter change
// if cvode is not being used, just call fcurrent()
if (cvode.active()) {
cvode.re_init()
} else {
fcurrent()
}
}
// plot relationship between cai and ica_capmp
CAIMIN = 1e-5 // lowest and highest cai to test
CAIMAX = 0.1
INCREMENT = 10^0.1 // multiplier
objref caivec, icavec // to record the data that will be plotted
caivec = new Vector()
icavec = new Vector()
cai0 = CAIMIN
while (cai0<=CAIMAX) {
init()
caivec.append(cai(0.5))
icavec.append(ica(0.5))
cai0 *= INCREMENT
}
objref g
{
g = new Graph(0)
g.size(-5,-1,0,0.003)
g.view(-5, 0, 4, 0.003, 292, 109, 300.48, 200.32)
g.label(0.115016, 0.814697, "ica_capmp", 2, 1, 0, 0, 1)
g.label(0.69968, 0.177316, "log10(cai)", 2, 1, 0, 0, 1)
icavec.plot(g, caivec.c.log10())
}
// generate plot of cai vs. t
objref g1
g1 = new Graph()
proc run1() {
cai0 = $1
init()
g1.size(0,tstop,0,$1)
g1.beginline
while(t < tstop) {
g1.line(t, cai)
step(.1)
}
g1.flush()
}
proc run() {
run1(.01)
}
proc change_d(){
g1.color(1)
g1.label(.8,.8,"diam=100")
diam=100
run()
g1.color(2)
g1.label(.8,.7,"diam=1")
diam=1
run()
g1.color(3)
g1.label(.8,.6,"diam=.2")
diam=.2
run()
}
// run simulations that show time course of cai for different diameters
change_d()
|