Search found 1618 matches

by hines
Fri Apr 16, 2021 7:26 am
Forum: OS X
Topic: If you can't compile mod files . . .
Replies: 26
Views: 32895

Re: If you can't compile mod files . . .

I wonder if "kv" is not the SUFFIX in the kv.mod file. In your mods folder, what is the result of grep -w kv *.mod From another direction, what is the result of (after loading the dylib) of import neuron dir(neuron.nrn) print ("kv" in dir(neuron.nrn)) By the way, I generally don'...
by hines
Thu Apr 15, 2021 7:20 pm
Forum: OS X
Topic: If you can't compile mod files . . .
Replies: 26
Views: 32895

Re: If you can't compile mod files . . .

One can always use

Code: Select all

from neuron import h
h.nrn_load_dll("/the/full/path/to/the/x86_64/libnrnmech.dylib")
by hines
Thu Apr 15, 2021 11:37 am
Forum: OS X
Topic: If you can't compile mod files . . .
Replies: 26
Views: 32895

Re: If you can't compile mod files . . .

Did you launch using a terminal from the parent folder of the x86_64 folder?
by hines
Thu Apr 15, 2021 7:45 am
Forum: OS X
Topic: If you can't compile mod files . . .
Replies: 26
Views: 32895

Re: If you can't compile mod files . . .

The web page referred to needs to be updated. The library is present in the x86_64 folder and will be automatically loaded if you launch nrniv in the
parent folder.
by hines
Mon Mar 29, 2021 10:05 am
Forum: Other questions
Topic: spFactor error: Zero Diagonal
Replies: 7
Views: 4211

Re: spFactor error: Zero Diagonal

I need to reproduce the problem on my machine if possible. Can you send me (michael dot hines at yale dot edu) a zip file with all the needed hoc,ses,mod,py files that comprise the simulation? No guarantee that I'll succeed or that my diagnostic path will generalize, but I'll take notes on the proce...
by hines
Tue Mar 23, 2021 7:47 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: calling a function from NMODL
Replies: 10
Views: 602

Re: calling a function from NMODL

I hope you are doing a sanity check when you have problems by printing some details. e.g print(seg.sec.name(), seg.x, seg.v, seg.Kv1.alphan) Anyway, one problem I see is that for seg in sec.allseg(): includes in the iteration sec(0) and sec(1) which are zero area nodes and do not contain Kv1. The li...
by hines
Mon Mar 22, 2021 5:14 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: calling a function from NMODL
Replies: 10
Views: 602

Re: calling a function from NMODL

I see you have a def wrapper(alphan, betan, n, noise) but in your recording_callback = (wrapper, (seg.alphan_Kv1 , seg.betan_Kv1, seg.n_Kv1 , 0 )) the arguments to wrapper are just constant values computed at the time the recording_callback assignment statement is executed. In your mod file, alpahn ...
by hines
Thu Mar 18, 2021 9:50 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: calling a function from NMODL
Replies: 10
Views: 602

Re: calling a function from NMODL

My opinion is that findnoiseterm should not be the callback but instead the callback should be a wrapper python function that for every instance of Kv1, the wrapper would call findnoiseterm and assign the return value into z1_Kv1 (which should be a regular RANGE variable instead of a POINTER.) If th...
by hines
Wed Mar 17, 2021 10:08 am
Forum: Adding new mechanisms and functions to NEURON
Topic: calling a function from NMODL
Replies: 10
Views: 602

Re: calling a function from NMODL

Forgot to show the usage of the mod file... Note that the callback happens at the end of finitialize and at the beginning of a step. nrnivmodl beforestep_py.mod $ cat temp.py from neuron import h #enough model for the point process to have a home s = h.Section() # and for something interesting to ha...
by hines
Wed Mar 17, 2021 9:53 am
Forum: Adding new mechanisms and functions to NEURON
Topic: calling a function from NMODL
Replies: 10
Views: 602

Re: calling a function from NMODL

I think that CVode.extra_scatter_gather is fine (in the after scatter direction) for your purpose because, since you are dealing with channel noise, you are most likely using only the fixed step method. In general we need to introduce something like Cvode.before_step(python_callback) which, for vari...
by hines
Mon Jan 25, 2021 4:42 pm
Forum: MSWin
Topic: Issues with Anaconda install
Replies: 2
Views: 760

Re: Issues with Anaconda install

From a terminal which can run the specific conda environment, do you have a PYTHOPATH that mentions c:\nrn\lib\python ? If you launch python (in your specific conda environment and without such a PYTHONPATH) can you import sys sys.path.append("c:/nrn/lib/python") import neuron neuron.test(...
by hines
Thu Jan 21, 2021 10:28 am
Forum: Parallel NEURON
Topic: Efficient way of debugging Python scripts with MPI library
Replies: 4
Views: 398

Re: Efficient way of debugging Python scripts with MPI library

I was accessing a cell that is not associated with the rank it was made This wording puzzles me as I don't know anyway for a cell not to be associated with the rank it was made on. (although if you are using multisplit there may be parts of a cell that are on ranks that are different from the rank ...
by hines
Mon Nov 23, 2020 6:53 am
Forum: Getting started
Topic: Display environment error
Replies: 2
Views: 566

Re: Display environment error

XQuartz is one of those installations that requires one to logout and log back in in order to activate it.
by hines
Mon Nov 23, 2020 6:50 am
Forum: Getting started
Topic: Compiling Mod Files on Catalina
Replies: 8
Views: 1109

Re: Compiling Mod Files on Catalina

A work around for now for readline problems is to try
nrn-7.8.1-2-gdfe33e60-osx-27-36-37-38-39.pkg
or
nrn-8.0.dev-239-g8f2aaaa9.w64-mingw-py-27-36-37-38-39-setup.exe
at
https://neuron.yale.edu/ftp/neuron/versions/alpha/
These use NEURON's internal readline sources.
by hines
Sat Nov 21, 2020 11:52 am
Forum: Getting started
Topic: Compiling Mod Files on Catalina
Replies: 8
Views: 1109

Re: Compiling Mod Files on Catalina

Because of these perennial problems with readline when binary distributions are installed, we will be taking the tack during build of compiling a recent version of readline ourselves as a libreadline.a file along with ncurses and incorporating that into the libnrniv.dylib. I hope after that I'll nev...