another compiling error

NMODL and the Channel Builder.
Post Reply
MH

another compiling error

Post by MH »

Hi!
The following error occurs for several mechanisms that I'm trying to implement: "syntax error: Illegal block at line 13: PARAMETERS {". What can I do to fix this error? Also, do you see any other problems with the code? The code is below.
Sincerely,
MH

Code: Select all

UNITS {
	(molar) = (mole/litre)
	(mM) = (millimolar)
}

PARAMETERS {
	Km.CMDN = 2.38e-03 (mM)		
	conc_CMDN_total = 50.0e-03 (mM)	
	conc_ca_i = 7.901351e-05 (mM)	
	Km.EMTA = 1.5e-04 (mM)		
	conc_EGTA_total = 10.0 (mM)	
}

BREAKPOINT {
	beta_i = (1+ ((conc_CMDN_total * Km.CMDN)/(Km.CMDN + (conc_ca_i)^2) + ((conc_EGTA_total * Km.EGTA) / (Km.EGTA + (conc_ca_i)^2)) ^ -1
}
csh
Posts: 52
Joined: Mon Feb 06, 2006 12:45 pm
Location: University College London
Contact:

Re: another compiling error

Post by csh »

Hello!
MH wrote:Hi!
The following error occurs for several mechanisms that I'm trying to implement: "syntax error: Illegal block at line 13: PARAMETERS {". What can I do to fix this error?
Use PARAMETER instead of PARAMETERS. The latter is not an NMODL keyword.
MH wrote: Also, do you see any other problems with the code?

Code: Select all

: ...
PARAMETERS {
	Km.CMDN = 2.38e-03 (mM)		
: ...
	Km.EMTA = 1.5e-04 (mM)		
: ...
}
: ...
Yes, there are other problems: it's illegal to use a "." (dot) within a variable name. Change them to Km_CMDN or similar. Looking a little further down your code, you probably meant Km_EGTA instead of Km_EMTA.

Code: Select all

: ...
BREAKPOINT { 
        beta_i = (1+ ((conc_CMDN_total * Km.CMDN)/(Km.CMDN + (conc_ca_i)^2) + ((conc_EGTA_total * Km.EGTA) / (Km.EGTA + (conc_ca_i)^2)) ^ -1 
}
First, there are 9 opening and 7 closing parentheses. You will have to fix that first. Second, although I'm not sure from your code snippet, I guess what you really wanted here is a function:

Code: Select all

FUNCTION beta_i()  {
        beta_i = (1 + ((conc_CMDN_total * Km_CMDN) / (Km_CMDN + conc_ca_i^2) + conc_EGTA_total * Km_EGTA) / (Km_EGTA+ conc_ca_i^2)))^-1
}
Altogether, here is some code that will be translated and compiled, although I cannot give you any guarantee that it will do what you want:

Code: Select all

UNITS {
   (molar) = (mole/litre)
   (mM) = (millimolar)
}

PARAMETER {
   Km_CMDN = 2.38e-03 (mM)      
   conc_CMDN_total = 50.0e-03 (mM)   
   conc_ca_i = 7.901351e-05 (mM)   
   Km_EGTA = 1.5e-04 (mM)      
   conc_EGTA_total = 10.0 (mM)   
}

FUNCTION beta_i()  {
        beta_i = (1 + ((conc_CMDN_total * Km_CMDN) / (Km_CMDN + conc_ca_i^2) + conc_EGTA_total * Km_EGTA) / (Km_EGTA+ conc_ca_i^2)))^-1
}
A great starting point to learn more about NMODL is either the NEURON book, chapter 9, or this document:

http://www.neuron.yale.edu/neuron/paper ... odl400.pdf


I hope I could help,
Christoph
Post Reply