I haven't worked on my RxD model for months and now, after installing the latest NEURON version from git (3 october 2019) to be up to date, my code give rise to an error.
The issue is generated by reactions with species placed across different locations, in this case, the soma of two distinct cells and the ecs.
Code: Select all
soma_cell_1 = rxd.Region([cell_1.soma], nrn_region='i', geometry=rxd.Shell(0.8, 1))
species_x = rxd.Species([soma_cell_1, ecs, soma_cell_2], name='species_x', d=1, charge=1, initial=0, ecs_boundary_conditions=0)
reaction_1 = rxd.Reaction(Species_y >Species_z + species_x, 0.058, regions = [soma_cell_1])
Code: Select all
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/neuron/rxd/rxd.py", line 1529, in _init
initializer._do_init()
File "/usr/local/lib/python2.7/dist-packages/neuron/rxd/initializer.py", line 51, in _do_init
obj._do_init()
File "/usr/local/lib/python2.7/dist-packages/neuron/rxd/reaction.py", line 82, in _do_init
self._update_rates()
File "/usr/local/lib/python2.7/dist-packages/neuron/rxd/reaction.py", line 141, in _update_rates
self._rate, self._involved_species = rxdmath._compile(rate, self._react_regions)
File "/usr/local/lib/python2.7/dist-packages/neuron/rxd/rxdmath.py", line 95, in _compile
s = arith._semi_compile(reg, instruction)
File "/usr/local/lib/python2.7/dist-packages/neuron/rxd/rxdmath.py", line 537, in _semi_compile
items_append(item._semi_compile(region, instruction))
File "/usr/local/lib/python2.7/dist-packages/neuron/rxd/rxdmath.py", line 342, in _semi_compile
return '(%s)*(%s)' % (self._a._semi_compile(region, instruction), self._b._semi_compile(region, instruction))
File "/usr/local/lib/python2.7/dist-packages/neuron/rxd/rxdmath.py", line 537, in _semi_compile
items_append(item._semi_compile(region, instruction))
File "/usr/local/lib/python2.7/dist-packages/neuron/rxd/species.py", line 215, in _semi_compile
raise RxDException("Species %r is not defined on region %r." % (self, reg))
neuron.rxd.rxdException.RxDException: Species Species(regions=[Region(..., nrn_region='i', geometry=Shell(lo=0.8, hi=1), dx=0.25, name=None)], d=0.1, name='no_GC', charge=1, initial=0) is not defined on region Region(..., nrn_region='i', geometry=Shell(lo=0.8, hi=1), dx=0.25, name=None).
nrn/nrn/x86_64/bin/nrniv: Python Callback failed
near line 0
Best
Stefano