communication between .mod files

NMODL and the Channel Builder.
Post Reply
jamie

communication between .mod files

Post by jamie »

I have a calcium channel mechanism, CaE.mod, that writes ica_CaE. Also I have an intracellular calcium mechanism that sets the intracellular calcium concentration, cad.mod. These can be found in modeldb:

CaE is not the only calcium channel in the system. But I only care about CaE for now.

CaE writes ica_CaE. I wish cad to be able to "read" ica_CaE. I tried this line in cad.mod:

USEION ca READ ica,cai,ica_CaE WRITE cai

This did not work.
Then I found on this forum the notion of POINTER. And read the threads and documentation on this etc and tried to implement it. But I cant get it working.

I have put this in the NEURON block of CaE.mod:
POINTER mu
And mu is assigned as ica in the BREAKPOINT block:
mu = ica
And mu is declared in the ASSIGNMENT block.
THIS COMPILES OK.

In cad.mod I have made a new variable called msg which I have declared in the ASSIGNMENT BLOCK and then use it in a loop in the BREAKPOINT block:
if(msg < -0.02 ) { }
THIS COMPILES OK

Then in hoc:

section {
setpointer mu_CaE, msg_cad
}

BUT when running the hoc file it returns an error. I think bad syntax. I am really not sure what I am doing. I know there are a lot of templates for this in the documentation and modeldb. But they tend to be dealing with synapses and objrefs etc. I dont know how that syntax relates to my situation.

I tried the more direct in hoc.
mu_CaE = msg_cad
But couldnt get this working either. In the simulation the msg_cad had a value of 0. The values didnt seem to be pulling through from mu_CaE.

CaE.mod in modeldb:

http://senselab.med.yale.edu/senselab/m ... nj\CaE.mod

cad.mod in modeldb:

http://senselab.med.yale.edu/senselab/m ... lciumP.mod
ted
Site Admin
Posts: 6384
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: communication between .mod files

Post by ted »

jamie wrote:I have a calcium channel mechanism, CaE.mod, that writes ica_CaE. Also I have an intracellular calcium mechanism that sets the intracellular calcium concentration, cad.mod. These can be found in modeldb:

CaE is not the only calcium channel in the system. But I only care about CaE for now.

CaE writes ica_CaE. I wish cad to be able to "read" ica_CaE. I tried this line in cad.mod:

USEION ca READ ica,cai,ica_CaE WRITE cai

This did not work.
Then I found on this forum the notion of POINTER.
Stop. Stop immediately. Take no further steps in that direction. Forget about POINTER,
forget about mu.

Next read the documentation of USEION in The NEURON Book.

Then read the USEION statement in CaE.mod.

Code: Select all

USEION ca READ cai, cao WRITE ica
There is no mention of a CaE ion, or a ca_CaE ion, and nothing about writing an ica_CaE
current. It WRITEs ica. This means that the ica, calculated in its BREAKPOINT block by

Code: Select all

ica = gca* (v-eca)
will be pooled with all other icas mentioned by all other mechanisms attached to that
segment that happen to WRITE ica. This allows a calcium accumulation mechanism to
discover the net calcium current in the segment by having a USEION statement in its
NEURON block that asserts

Code: Select all

USEION ca READ ica . . . 
as you will doubtless note when you read cad.mod
jamie

Post by jamie »

Ah. sorry ted. I knew the calcium currents were pooled to create ica but I thought that I could "get" at them individually if I used syntax such as ica_CaE - to specify a read of just ica from CaE, and not from the other calcium currents as well. So, I guess that I'm mistaken in that. So, I guess when I use ica_CaE this is the same as the pooled ica.

Well that is bad news. But the good news is that I have actually got this POINTER stuff working I think. In hoc I used this:

setpointer SpinyDendrite.msg_cad(0.5), SpinyDendrite.mu_CaE(0.5)

And had "POINTER msg" in the NEURON block of cad.mod
mu_CaE is just the same as ica_CaE.
I can see that mu_CaE is pulling through to give its values to msg_cad as when plotted they are exactly the same.

I'm not too concerned about this ica_CaE issue as I dont think it is the best variable to give to cad.mod for my purposes now. I have another variable in mind now to pass through. I am going to pass in a variable called "tex" to cad.mod (tex is from another .mod mechanism and I will use the POINTER methodology that I have learnt). And in the NMODL of cad.mod I want to do an if-else conditional loop:

if (tex is rising in value) {x = y)
else {x = n}

But I am unsure how to code for an expression to sense if "tex is rising in value". I will work on finding this out myself but if anyone knows and is prepared to do a quick post I would be very grateful.
jamie

Post by jamie »

This is my pseudocode. Cant find anything in the NMODL documentation as yet to get me the specific NMODL syntax needed.

if (tex at time t > tex at time t-1) {x=y}
else
{x=n}
Post Reply