Basic modelling question

Extending NEURON to handle reaction-diffusion problems.

Moderators: hines, wwlytton, ramcdougal

Post Reply
stephanmg
Posts: 68
Joined: Tue Jul 03, 2012 4:40 am

Basic modelling question

Post by stephanmg »

Dear all,

I've implemented a CaT and a CaN (dependent on variable intracellular calcium concentration: cai) voltage gated calcium channel within NMODL for NEURON usage with the HOC interpreter.I want to construct a basic example which makes use of Calcium Diffusion within a single compartment model.

I took note of the documentation for Reaction-Diffusion in NEURON with Python, so i constructed the single compartment model. I can also insert the membrane mechanisms with the hoc Python module.

However, I'm concerned how I can translate the Calcium current to a change in intracellular Calcium concentration. Do I just need to specify the Region and Species like in the documentation was pointed out by, e. g.:
# dendrite is the name of the single compartment model specified in NEURON Python or likewise in a hoc geometry file which is loaded in NEURON Python
mydend = rxd.Region("dendrite", nrn_region='i', geometry=rxd.FractionalVolume(fc,surface_fraction=1))
ca = rxd.Species(mydend, d=caDiff, name='ca', charge=2, initial=caCYT_init)

Your thoughts and comments would mean much to me,
best Stephan
samnemo
Posts: 18
Joined: Sun Dec 12, 2010 1:14 pm

Re: Basic modelling question

Post by samnemo »

Hi Stephan,

The setup looks correct.

To link the calcium current in your mod file to changes in intracellular calcium concentration you should make sure you're using the ca ion in your mod file, eg with this: USEION ca READ cai,cao WRITE ica
The name = 'ca' is required in your rxd.Species setup, while using the same keyword ca ion in the mod file: USEION ca READ cai,cao WRITE ica
This establishes the name correspondence across rxd/python,hoc,mod.

You can verify that it's working as expected by recording the calcium concentration and current.

Please make sure you are using and maintaining current alpha (hg pull) version since this module is very much in development.

Also let us know here on the forum if any problems or if you need further suggestions.

Sam
ramcdougal
Posts: 267
Joined: Fri Nov 28, 2008 3:38 pm
Location: Yale School of Public Health

Re: Basic modelling question

Post by ramcdougal »

As long as a species has a "name" and lives on an rxd.Region with nrn_region = 'i' (or 'o'), then its concentrations will respond to currents.

You have a minor syntactic error: rxd.Region takes a list of sections; it does not accept a string.

For example, you could do something like:

Code: Select all

from neuron import h, rxd
dendrite1 = h.Section()
dendrite2 = h.Section()
mydend = rxd.Region([dendrite1, dendrite2], nrn_region='i')
ca = rxd.Species(mydend, d=caDiff, name='ca', charge=2, initial=caCYT_init)
Two tips:
  • - If your sections were created in HOC (perhaps with a morphology you found on ModelDB), you can get a list of all sections that contain "dend" in their name via: [sec for sec in h.allsec() if 'dend' in sec.name()]
    - h.allsec() is a Python iterable that contains all the sections. For technical reasons, you can pass that as the first argument to rxd.Region but you shouldn't assign a variable equal to it and use that for multiple rxd.Region objects.
You'll notice I left off the geometry= argument for rxd.Region. You only need that if you're dividing the interior of the dendrite into multiple subcompartments (e.g. in the documentation, we have a cytosol and an ER).
stephanmg
Posts: 68
Joined: Tue Jul 03, 2012 4:40 am

Re: Basic modelling question

Post by stephanmg »

Okay thanks for your charming comments, firstly.
I end up with this setup:


Code: Select all

from neuron import rxd, h
from nrn import *

dend = Section()
dend.nseg =  10
dend.Ra   = 1.00
dend.diam =  10
dend.L    = 100
dend.insert('CaT')

stim = h.IClamp(10.0, sec=dend)
stim.delay = 50
stim.dur = 50
stim.amp = 0.1

h.CVode().active(0)
h.finitialize()

# variable setup
steps = xrange(0, 1000)
caDiffCoefficient = 100
caCytInitialConcentration = 1.6

cyt = rxd.Region([dend], nrn_region='i')
ca  = rxd.Species(cyt, d=caDiffCoefficient, name='ca', charge=2, initial=caCytInitialConcentration)

print("Step (#) Time [ms] Voltage (Vm) Current (ica) IC calcium concentration EC calcium concentration")
for step in steps:
   print("%i %f %f %f %f %f" % (step, step*h.dt, dend.v, dend.ica, dend.cai, dend.cao))
   h.fadvance()

ExitNeuronSim()
Nevertheless i don't see a change in cai and cao.
Btw: h.continuerun(1000) is not available by error message: AttributeError: 'hoc.HocObject' object has no attribute 'continuerun'

I look for running the simulation at this tutorial: http://www.neuron.yale.edu/neuron/stati ... he-program

Best and I appreciate much your help,
Stephan
stephanmg
Posts: 68
Joined: Tue Jul 03, 2012 4:40 am

Re: Basic modelling question

Post by stephanmg »

Btw. i used an example channel from:
http://senselab.med.yale.edu/modeldb/sh ... nj\CaT.mod

and inserted it into my sections.

Best,
Stephan
samnemo
Posts: 18
Joined: Sun Dec 12, 2010 1:14 pm

Re: Basic modelling question

Post by samnemo »

for access to continuerun you can do: h.load_file("stdrun.hoc")

can you post output showing the problem you're still having connecting rxd and the mod mechanism?
samnemo
Posts: 18
Joined: Sun Dec 12, 2010 1:14 pm

Re: Basic modelling question

Post by samnemo »

should cai increase = is there any current through your channel?
SurG
Posts: 11
Joined: Fri Jun 19, 2015 4:39 pm

Re: Basic modelling question

Post by SurG »

Hi,

We are also trying to implement a similar setup. We have two compartments, the ER and the cytosol and have a mod file, whose parameters we need to access via the RxD module. We have a couple of queries regarding this:

1. Is it possible to ensure bidirectional communication between mod file and the python script? For instance, mod file alters cai, which should be read by the RxD program. As calcium diffuses across segments, can the new calcium concentration be re-read by the mod file? There was a post that specified that the "Species ca" will ensure cross-talk between the files but we haven't been able to achieve that yet. So any help towards this direction will be immensely appreciated.

2. Can we choose the segments in which we would "insert" the mod file? We don't wish the mod file to be present in all the segments.

Thank you in advance,
Post Reply