"My mechanisms don't load!"

NMODL and the Channel Builder.
santana_loren9
Posts: 12
Joined: Thu Oct 19, 2017 6:42 pm

Re: "My mechanisms don't load!"

Post by santana_loren9 » Tue Dec 05, 2017 2:52 pm

Thank you for that explanation.
Yes, I do have many mod files. I was trying to start with two to see if I could identify the problem.
Thanks Ted.

santana_loren9
Posts: 12
Joined: Thu Oct 19, 2017 6:42 pm

Re: "My mechanisms don't load!"

Post by santana_loren9 » Tue Dec 05, 2017 5:10 pm

I'm sorry, I do have one more question. If you add new things to the folder where you have hoc and mod files or if you make a change to a hoc file in the folder, do you have to drag the whole folder again to mknrndll?

hines
Site Admin
Posts: 1493
Joined: Wed May 18, 2005 3:32 pm

Re: "My mechanisms don't load!"

Post by hines » Wed Dec 06, 2017 1:00 am

No. Only drag folder to mknrndll if you change a mod file

santana_loren9
Posts: 12
Joined: Thu Oct 19, 2017 6:42 pm

Re: "My mechanisms don't load!"

Post by santana_loren9 » Wed Dec 06, 2017 1:07 am

Thank you.

mildan
Posts: 3
Joined: Tue Jun 19, 2018 9:40 am

Re: "My mechanisms don't load!"

Post by mildan » Tue Jun 19, 2018 6:21 pm

Hello everyone.

I'm trying to use a model of neuronal network - so called 'Traub
model' downloaded from the ModelDB (82894).

I used the nrnivmodl command in the .mod files directory which
supposedly succeeded and returned:
Successfully created x86_64/special
along with .lo and .c files corresponding to my .mod files

When I run the notorious 'hello world' .hoc inside the .mod directory
it works as expected I suppose with the
'loading membrane mechanisms from ... ' and 'Additional mechanisms
from files ... ' and 'hello' response.


However, after going with 'nrniv mosinit.hoc' / 'nrngui -nogui
mosinit.hoc' in the main directory i get syntax errors:

Code: Select all

nrniv: syntax error
 in ./cells/deepaxax_template.hoc near line 410
        insert naf2
                  ^
        xopen("./cells/deepaxax_template.hoc")
      localloadfile("cells/deepaxax_template.hoc")
    xopen("cell_templates.hoc")
  execute1("{xopen("cell_templates.hoc")}")
and others
        0
nrniv: syntax error
 in ./cells/deepaxax_template.hoc near line 412
        insert kdr_fs
                    ^
        xopen("onecell.hoc")
      execute1("{xopen("onecell.hoc")}")
    load_file("onecell.hoc")
nrniv: syntax error
 in ./cells/deepaxax_template.hoc near line 414
        insert ka
                ^
Does this mean that the mechanisms in .mod files didn't compile correctly?
Is using the nrnivmodl command not completely equivalent to the
drag'n'drop .mod folder into mknrndll method?

It's entirely possible that the solution to my problem has already
been presented earlier in this thread, but I might be newb enough not
to realize it.

Thanks a lot!

hines
Site Admin
Posts: 1493
Joined: Wed May 18, 2005 3:32 pm

Re: "My mechanisms don't load!"

Post by hines » Tue Jun 19, 2018 6:31 pm

NEURON only loads mod files by default if you start in the folder where you executed nrnivmodl. SInce you executed the latter in the mod
folder, if you wanted to load from the parent of the mod folder you would need
nrniv -dll mod/x86_64/.libs/libnrnmech.so mosinit.hoc
However, much better is to remove the mod/x86_64 folder created by nrnivmodl and instead in the parent folder (that contains mosinit.hoc)
execute
nrnivmodl mod

mildan
Posts: 3
Joined: Tue Jun 19, 2018 9:40 am

Re: "My mechanisms don't load!"

Post by mildan » Wed Jun 20, 2018 4:38 am

Correct. Thank you for quick respone.

Post Reply