Loading New Artifical Cell into NEURON

NMODL and the Channel Builder.
Post Reply
tmazing
Posts: 5
Joined: Wed Feb 06, 2019 7:39 pm

Loading New Artifical Cell into NEURON

Post by tmazing »

Hello!

So I've made a modified IntFire cell that I'd like to load into NEURON as an artificial cell. However, when I compile the mod files into neuron, the artificial cell still isn't loaded. Do I need to put my mod file in a special location and compile in a special way since it's an artificial cell? I'm operating on OSX if that's useful.

Thanks!

Tony
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Loading New Artifical Cell into NEURON

Post by ted »

First question: what is the name of your new integrate & fire cell class?

Second question: what exactly did you do to "compile the mod files into neuron"?

Third question: how do you know that your new cell class hasn't been added to NEURON?
tmazing
Posts: 5
Joined: Wed Feb 06, 2019 7:39 pm

Re: Loading New Artifical Cell into NEURON

Post by tmazing »

Hello!

1) named the new class IntFire4r.
2) I used the nrnivmodl command in the terminal within the folder containing the code.
3) The python line -- cell1 = h.IntFire4r() returns the following error:
AttributeError: 'hoc.HocObject' object has no attribute 'IntFire4r'
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Loading New Artifical Cell into NEURON

Post by ted »

named the new class IntFire4r
How?
I used the nrnivmodl command in the terminal within the folder containing the code.
Was there an error message? Was a nrnmech.dll or x86_64 directory produced?
The python line -- cell1 = h.IntFire4r() returns the following error:
AttributeError: 'hoc.HocObject' object has no attribute 'IntFire4r'
cd to the directory that contains the nrnmech.dll file or x86_64 directory. In that directory execute the command
nrngui
What message does NEURON print to the terminal?
tmazing
Posts: 5
Joined: Wed Feb 06, 2019 7:39 pm

Re: Loading New Artifical Cell into NEURON

Post by tmazing »

I named the mod file IntFire4r.mod and inside of the file, the first line of the neuron block is: ARTIFICIAL_CELL IntFire4r.

A x86_64 directory was produced with no error message.

When I cd to the directory and call nrngui, I get:
AMPA_DynSyn.mod B_A.mod B_DR.mod B_Na.mod CaIntraCellDyn.mod Elliott.mod GABAa_DynSyn.mod GABAb_DynSyn.mod Glycine_DynSyn.mod HH2.mod HH2new.mod HH3.mod HH3_12.mod IntFire4r.mod KDR.mod KDRI.mod Ks.mod NAP.mod NK1_DynSyn.mod NMDA_DynSyn.mod NaT.mod SS.mod caHVA.mod caLVA.mod gbara.mod h.mod iCaAN.mod iCaL.mod iKCa.mod iNaP.mod intfire4A.mod it2.mod itGHK.mod kA.mod kA2.mod kA3.mod kA4.mod kfast.mod kfasttab.mod kv1.mod kv1b.mod ls.mod spikeout.mod vecevent.mod vsource.mod

which includes IntFire4r (bolded).
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Loading New Artifical Cell into NEURON

Post by ted »

A x86_64 directory was produced with no error message.
This indicates that the mod file was compiled successfully.
When I cd to the directory and call nrngui, I get:
. . . IntFire4r.mod . . .
Under MSWin, when NEURON starts, it automatically checks the current working directory for a library called nrnmech.dll, which contains the binary code generated by compiling mod files (under Linux, the results of compilation are put into an automatically-generated subdirectory called x86_64). If nrnmech.dll (or x86_64) is present, NEURON reads the compiled code and reports the names of those mod files. The corresponding mechanisms are ready for use by NEURON.

My guess is that your nrnmech.dll file (or x86_64 directory) is not in the same directory as your hoc or Python files.
Post Reply