Here's what I have so far (mostly taken from a NEURON rxd tutorial:
Code: Select all
import math
from neuron import h, rxd, gui
from neuron.units import mV, ms, cm, mM
from neuron.crxd import v
from matplotlib import pyplot
h.load_file('stdrun.hoc')
# Create soma section
soma = h.Section(name='soma')
# Define the voltage and time step
v = h.Vector().record(soma(0.5)._ref_v)
t = h.Vector().record(h._ref_t)
h.dt = 0.025 # ms
# Define the rxd model following the standard specification
# Where
# intracellular
cyt = rxd.Region(h.allsec(), name='cyt', nrn_region='i')
# membrane
mem = rxd.Region(h.allsec(), name='cell_mem', geometry=rxd.membrane())
# extracellular
ecs = rxd.Extracellular(-100, -100, -100, 100, 100, 100, dx=33)
When I then run the next lines of code to specify the ion species:
Code: Select all
# Define intracellular sodium and potassium species on the 'cyt' region
na = rxd.Species(cyt, name='na', d=1, charge=1, initial=10 * mM)
k = rxd.Species(cyt, name='k', d=1, charge=1, initial=140 * mM)
RxDException: Species "na" previously defined on a region Region(..., nrn_region='i', geometry=, dx=0.25, name='cyt') that overlaps with regions: [Region(..., nrn_region='i', geometry=, dx=0.25, name='cyt')]
Could someone please explain what is happening here? Is this perhaps a version issue?