Opening .hoc files in neuron simulator + "not a mechanism" problem

517 Views Asked by At

I am trying to run a NEURON simulation via python. I got all the libraries in order and am able to run some simple simulations, but am experiencing some troubles with a more complicated code. If you have any idea how to help I will appreciate it very much

Problem number 1:

Neuron doesn't open part of a .hoc file even though it is compiled. I get the error:

NEURON: Can't open  import3d/import3d_sec.hoc
in import3d.hoc near line 1
{xopen("import3d/import3d_sec.hoc")}
                                     ^
        xopen("import3d/i...")
      xopen("import3d.hoc")
    execute1("{xopen("im...")
  load_file("C:/Users/U...")

Problem number 2:

The simulator doesn't recognize a mechanism I am trying to use. here I am a bit lost and don't know to describe further, but this is the error message:

 NEURON: Im is not a MECHANISM
 in L5PCbiophys5b.hoc near line 26
    insert Im 
            ^
        xopen("L5PCbiophy...")
      execute1("{xopen("L5...")
    load_file("C:/Users/U...")

Problem number 3:

Not recognizing as a template:

 NEURON: Import3d_Neurolucida3 is not a template
 in L5PCtemplate_2.hoc near line 26
   nl = new Import3d_Neurolucida3()
                                  ^
        xopen("L5PCtempla...")
      execute1("{xopen("L5...")
    load_file("C:/Users/U...")
1

There are 1 best solutions below

1
On
  1. You can try to use an absolute path
  2. The name for insert should match with the SUFFIX statement in the file; also make sure that file was compiled in and that the dll is loaded (should be a message when you start nrniv)
  3. Perhaps a result of the file xopen problem? If it is a template-containing file you should use load_file() instead of xopen()