Mg block of NMDA receptors

NMODL and the Channel Builder.
Post Reply
Yaeger
Posts: 33
Joined: Mon Aug 19, 2013 4:36 pm

Mg block of NMDA receptors

Post by Yaeger »

I am trying to implement Mg2+ block of NMDA receptors but am having a hard time figuring out where to put the equation for block. Right now I have the equation for block in the INITIAL block. m is the block equation in the code below. Otherwise the mod file for the synapse is similar to Exp2Syn except that this mod file has five exponential terms.

Code: Select all

INITIAL {
	LOCAL tp, exp1
	tp = 9.8330
	factor = exp(-tp/tau1) -4*exp(-tp/tau2) +6*exp(-tp/tau3) -4*exp(-tp/tau4) +exp(-tp/tau5)
	factor = 1/factor
	exp1 = exp((-2*FARADAY*v*frac)/(R*1000*(273.15 + celsius))
	m = k/(k + exp1)
	A = 0
	B = 0
	C = 0
	D = 0
	E = 0
}
I get an error message when I try to compile:

Translating MFnfast.mod into MFnfast.c
syntax error:
Illegal expression:
Illegal block at line 60 in file MFnfast.mod
m = k/(k + exp1)
^
make: *** [MFnfast.c] Error 1

Why is this illegal and where is a better place to put the block equation? I tried putting m and exp1 in FUNCTION blocks as in the mod files for voltage-dependent channels, but I got an error message as well.
Yaeger
Posts: 33
Joined: Mon Aug 19, 2013 4:36 pm

Re: Mg block of NMDA receptors

Post by Yaeger »

Also, now that I think about it, putting the Mg2+ block equation in the INITIAL block as I have the mod file will only allow for a change in Mg2+ block at the time of the delivery of the event, so this is probably not a good place to put this.

Code: Select all

NET_RECEIVE(weight (umho), w) {
	A = A + weight*m*factor
	B = B + weight*m*factor
	C = C + weight*m*factor
	D = D + weight*m*factor
	E = E + weight*m*factor
}
ted
Site Admin
Posts: 6300
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Mg block of NMDA receptors

Post by ted »

Good programmers write good code. Excellent programmers steal great code.

Time to see how others have dealt with this.

Go to ModelDB's home page.
Click on "ModelSearch" (at the end of the sentence "Combine ModelDB curated keywords with a Google search").
Click on the Keywords button for Model Receptors and select NMDA.
Click on the Keywords button for Simulator Software and select NEURON.
Click on the Search button.
75 hits.

Look at a couple of them.
In particular examine the BREAKPOINT block and see what is done.
Those with Migliore as first- or co-author would be good examples.
Post Reply