I'm trying to introduce RxD species and reactions into a set of compartments in a multicompartmental neuron model and give inputs to some of the species. I have a list of sections for which I'm creating the Rxd Region (after defining a cell model L5PC, in this case a regular Hay model) as
Code: Select all
seclist = [h.L5PC.apic[3],h.L5PC.apic[30],h.L5PC.apic[90]]
cyt = rxd.Region(seclist, name='cyt', nrn_region='i')
I divided it also into different regions as
Code: Select all
cyts = []
for iapic in [3,30,90]:
cyts.append(rxd.Region([h.L5PC.apic[iapic]], name='cyt_apic'+str(iapic), nrn_region='i'))
Let's say I have a species gaba in my three compartments as follows:
Code: Select all
gaba = rxd.Species(cyt, name='gaba', charge=0, initial=0.0)
I then try to allow gabaergic input to one of the compartments, so I created parameters controlling the rate of gaba influx for each of them:
Code: Select all
gaba_flux_rates = []
reaction_gaba_fluxes = []
for icyt in range(0,len(seclist)):
gaba_flux_rates.append(rxd.Parameter(cyts[icyt], initial=0))
reaction_gaba_fluxes.append(rxd.Rate(gaba, gaba_flux_rates[icyt]))
Later I'd like to add events that alter the parameters gaba_flux_rates[icyt], but I'm already getting an error saying "Rates and Reactions with species defined on different regions are not currently supported." If I instead define just one gaba_flux_rate parameter for the whole cyt region and one corresponding Rate reaction, it compiles and runs. But then I cannot control the gaba rate at different compartments separately, instead the gaba flux is always the same to all compartments.
Any advice?