access to range variable from mod file

The basics of how to develop, test, and use models.
Post Reply
Gannier

access to range variable from mod file

Post by Gannier »

hi!

I have a mod file for ICaL, writing on ica and described like that
NEURON {
SUFFIX ICaL
USEION ca READ cai WRITE ica
RANGE gCaL, ica, ical

I have another mod file for a current under the influence of ICaL only (not ica).

NEURON {
SUFFIX Ca_SR
USEION cr READ icr, cri WRITE icr VALENCE 2
USEION ca READ cai, ica
RANGE ical, icr

In the calculus for the new value of icr, the next function should be evaluated : Fn = Vrel*icr - ( ical / 0.96480e-2 )

but a range variable can be accessible from hoc file not from other mod file and I need to access only ical not ica.
is there a way to access a range variable from a mod file to another one or should I change the use of ical?

Thanks in advance,
F GANNIER
ted
Site Admin
Posts: 6394
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

Clever use of USEION statements should take care of the problem.

Ordinary calcium currents should declare
USEION ca READ whatever_ca_stuff_it_needs WRITE ica
where whatever_ca_stuff_it_needs may be any combination of eca, cai, cao, ica

The CaL mechanism should declare
USEION ca READ whatever_ca_stuff_it_needs
USEION cal READ whatever_cal_stuff_it_needs WRITE ical VALENCE 2
where whatever_cal_stuff_it_needs may be any combination of ecal, cali, calo, ical

The CaSR mechanism should declare
USEION ca READ whatever_ca_stuff_it_needs
USEION cal READ whatever_cal_stuff_it_needs VALENCE 2
USEION cr READ whatever_cr_stuff_it_needs WRITE icr VALENCE 2
where whatever_cr_stuff_it_needs may be any combination of ecr, cri, cro, icr
I must ask if icr truly moves charge across the membrane of the cell, or
if it merely represents a flux between cytoplasm and an intracellular
organelle. If the latter, icr should not affect the charge on membrane
capacitance, so it must be paired with a NONSPECIFIC_CURRENT ins
that is of equal magnitude but opposite sign.

Assuming that ical and ir flow into the same pool as ica does, there should
be a calcium accumulation mechanism that declares
USEION ca READ ica WRITE cai
USEION cal READ ical VALENCE 2
USEION cr READ icr VALENCE 2

And if SR has its own pool from which icr flows, there should be another
accumulation mechanism that declares
USEION cr READ icr,cro WRITE cro VALENCE 2
where the contents of the SR are treated as if they were "extracellular"
(well, they are in a compartment that lies "outside" the cytoplasm, but
of course the volume of that compartment is not the same as the
extracellular volume).

I hope this helps more than it confuses.
Gannier

Post by Gannier »

Hello Ted!

Thanks for your response.

In fact, SR was an endoplasmic reticulum (Sarcoplasmic reticulum),
so I must substract icr to the global current through the membrane.

I think I should do the same for ical since it was already taken into account in ica if I write in ICaL.mod :

BREAKPOINT {
SOLVE states METHOD derivimplicit
ical = gCaL*m*n*h*(v - 65)
ica = ical
ins = -ical
}

where ins was a nonspecific_current.
is there an impact on the speed of simulation when using USEION many times ?
ted
Site Admin
Posts: 6394
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post by ted »

I think I should do the same for ical since it was already taken into account in ica if I write in ICaL.mod :

Code: Select all

BREAKPOINT {
    SOLVE states METHOD derivimplicit
    ical = gCaL*m*n*h*(v - 65)
    ica = ical
    ins = -ical
}
where ins was a nonspecific_current.
Correct--if the NEURON block contains
USEION ca . . . WRITE ica
USEION cal . . . WRITE ical
it is necessary to cancel out the electrical effect of the second WRITE.
is there an impact on the speed of simulation when using USEION many times ?
I have seen repeated runs execute more slowly under MSWin when using graphs with
Keep Lines activated--MSWin seems to have problems dealing with windows that contain
a large number of plotted points. If this does not pertain to your situation, maybe you
have exposed a memory leak or some other bug that affects performance. Please let
me know so we can follow up on this if necessary.
Gannier

Post by Gannier »

I followed your recommandation and the simulation seems good

I'm using windows XP and effectivelly, using some graph windows slow down the simulation but the "quiet mode" is very fast.

other problem:
Using "insert/remove mechanisms" with my model works only on quiet mode. when "quiet mode" and one or more mechanisms were OFF, running simulation doesn't work, nothing happen while it works in "quiet mode"
ted
Site Admin
Posts: 6394
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Splitting this discussion thread

Post by ted »

Gannier raised a completely new question, which is continued in the thread entitled
Running after uninserting a mechanism
https://www.neuron.yale.edu/phpBB2/viewtopic.php?t=923
Post Reply