Basic modelling question

Extending NEURON to handle reaction-diffusion problems.

Moderators: hines, wwlytton, ramcdougal

Basic modelling question

Postby stephanmg » Wed Jun 04, 2014 11:45 am

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
stephanmg
 
Posts: 66
Joined: Tue Jul 03, 2012 4:40 am

Re: Basic modelling question

Postby samnemo » Wed Jun 04, 2014 12:25 pm

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
samnemo
 
Posts: 8
Joined: Sun Dec 12, 2010 2:14 pm

Re: Basic modelling question

Postby ramcdougal » Wed Jun 04, 2014 1:52 pm

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).
ramcdougal
 
Posts: 77
Joined: Fri Nov 28, 2008 4:38 pm
Location: Yale School of Medicine

Re: Basic modelling question

Postby stephanmg » Thu Jun 05, 2014 5:33 am

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: 66
Joined: Tue Jul 03, 2012 4:40 am

Re: Basic modelling question

Postby stephanmg » Fri Jun 06, 2014 8:43 am

Btw. i used an example channel from:
http://senselab.med.yale.edu/modeldb/sh ... 7664&file=\prknj\CaT.mod

and inserted it into my sections.

Best,
Stephan
stephanmg
 
Posts: 66
Joined: Tue Jul 03, 2012 4:40 am

Re: Basic modelling question

Postby samnemo » Wed Jun 18, 2014 4:09 am

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: 8
Joined: Sun Dec 12, 2010 2:14 pm

Re: Basic modelling question

Postby samnemo » Wed Jun 18, 2014 4:11 am

should cai increase = is there any current through your channel?
samnemo
 
Posts: 8
Joined: Sun Dec 12, 2010 2:14 pm

Re: Basic modelling question

Postby SurG » Thu Sep 08, 2016 5:49 am

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,
SurG
 
Posts: 3
Joined: Fri Jun 19, 2015 4:39 pm


Return to Reaction-diffusion in NEURON

Who is online

Users browsing this forum: No registered users and 1 guest