Error message "Is not a template" when using .mod

NMODL and the Channel Builder.
Post Reply
lara

Error message "Is not a template" when using .mod

Post by lara »

I had some synaptic responses defined in nmodl files which compiled fine to make .o files. I called these from a .hoc program with ..... = new name of nmodl file and it worked fine but then it stopped working and now gives the error "nmodl file name is not a template"

Any help is much much much appreciated
Lara
ted
Site Admin
Posts: 6300
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Error message "Is not a template" when using .

Post by ted »

nmodl files which compiled fine to make .o files
.o files are only intermediate results and can be discarded. What counts is the
file called nrnmech.dll (under MSWin and OS X); under UNIX or Linux, the
important stuff tucked away in a subdirectory so you don't see it.

Either way, when you start NEURON, its interpreter should print a
message something like
Additional mechanisms from files . . .
which tells you that your user-defined mechanisms have been loaded.
I called these from a .hoc program with ..... = new name of nmodl file
Do not confuse the name of a mod file with the name of the
mechanism that it defines. These are completely different things.
The name of the mod file doesn't matter at all. It's the name
of the mechanism, which is declared by the
POINT_PROCESS
statement in the NEURON block. It can be helpful, as a reminder
to oneself, to give the mod file a name that is similar to the name of
the mechanism, but there is absolutely no reason why the mod file
cannot have a completely different name altogether. For example,
expsyn.mod contains the definition of ExpSyn (names are similar
but not identical), and svclmp.mod contains the definition of SEClamp
(names are very different).
then it stopped working and now gives the error "nmodl file name is not a template"
". . . is not a template" is what the hoc parser says when it encounters
a name that you are using as an object, but which it does not find in its
list of object classes. There are two ways that a user can add new
object classes to this list: by writing a template, or by defining a new
type of point process in a mod file and compiling that mod file. In your
particular case, this error message means that NEURON doesn't
know about your point processes. Either the nrnmech.dll (or special)
has been deleted, or you have moved your hoc & ses files into a new
directory that doesn't contain the nrnmech.dll (or the subdirectory that
contains the special). If you examine the messages that NEURON
prints when it first starts, you won't see the "Additional mechanisms
from files . . . " that I mentioned above.

The solution is to make sure that the mod files you need are in the
same directory as your hoc and ses files, and then run mknrndll
(or nrnivmodl) so that your mod files are compiled.
Post Reply