Code: Select all
from pylab import *
from neuron import h,rxd
h("""
load_file("stdlib.hoc")
load_file("stdrun.hoc")
create soma
soma nseg=1
soma insert CaDynamics_E2
soma gamma_CaDynamics_E2 = 1.0
soma insert can
soma insert pas
objref cvode
cvode = new CVode()
cvode.active(1)
cvode.atol(0.00005)
""")
sec = h.soma
cyt = rxd.Region([sec], name='cyt'+str(sec), nrn_region='i')
ca = rxd.Species(cyt, name='ca', charge=2, initial=0.0)
cab = rxd.Species(cyt, name='cab', charge=0, initial=1.0)
cabca = rxd.Species(cyt, name='cabca', charge=0, initial=0.0)
cabuf_reaction = rxd.Reaction(ca + cab, cabca, 1.0, 0.1)
ca_flux_rate = rxd.Parameter(cyt, initial=0)
reaction_flux = rxd.Rate(ca, ca_flux_rate)
h.tstop = 400
vecs = [];
vecs.append(h.Vector()); vecs[-1].record(ca.nodes(sec)(0.5)[0]._ref_concentration)
vecs.append(h.Vector()); vecs[-1].record(cabca.nodes(sec)(0.5)[0]._ref_concentration)
h("""
objref tvec, carec, icarec, Vrec
tvec = new Vector()
carec = new Vector()
icarec = new Vector()
Vrec = new Vector()
cvode.record(&v(0.5),Vrec,tvec)
cvode.record(&cai(0.5),carec,tvec)
cvode.record(&ica(0.5),icarec,tvec)
""")
h("""objref stim
soma stim = new IClamp(0.5)
stim.amp = 200
stim.dur = 5
stim.del = 50
""")
h.init()
def set_param(param, val):
param.nodes.value = val
h.cvode.re_init()
h.cvode.event(250, lambda: set_param(ca_flux_rate, 0.005))
h.cvode.event(350, lambda: set_param(ca_flux_rate, 0))
h.continuerun(h.tstop)
f,axarr = subplots(2,2)
ax = [axarr[0,0],axarr[0,1],axarr[1,0],axarr[1,1]]
ax[0].plot(array(h.tvec),array(vecs[0]),label='Ca (mM)')
ax[0].plot(array(h.tvec),array(vecs[1]),label='CaBCa (mM)')
ax[1].plot(array(h.tvec),array(h.Vrec),label='V (mV)')
ax[2].plot(array(h.tvec),array(h.carec),label='[Cai] (mM)')
ax[3].plot(array(h.tvec),array(h.icarec),label='ica (mA/cm2)')
for a in ax: a.legend()
ax[2].set_xlabel('t (ms)'); ax[3].set_xlabel('t (ms)')
f.savefig("mwe_ca.eps")
The script introduces two inputs: an IClamp that elevates the membrane potential at t=50 ms that induces Ca2+ current through the N-type Ca2+ channels and a flux of RxD-species 'ca' from 250 to 350 ms. However, the Ca2+ current through the N-type Ca2+ channels does not contribute to the intracellular Ca2+ (recorded in carec), as seen in the lower-left panel. If I rename the species as
Code: Select all
ca = rxd.Species(cyt, name='caFoo', charge=2, initial=0.0)
Any suggestions how to solve this issue?