Search found 1492 matches

by hines
Sat Jul 07, 2018 6:14 pm
Forum: Other questions
Topic: Using event delivery system with fixed time step method.
Replies: 4
Views: 71

Re: Using event delivery system with fixed time step method.

cvode.active(1) is primarily for using cvode with fadvance() and ParallelContext.psolve(tstop). It is merely inadvertent that cvode.solve(tstop) does its work independently of the value of cvode.active(). Note, though, that cvode.solve does not make sense without a precursor call to cvode.re_init() ...
by hines
Tue Jun 19, 2018 6:31 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: "My mechanisms don't load!"
Replies: 21
Views: 20042

Re: "My mechanisms don't load!"

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 rem...
by hines
Fri Jun 15, 2018 5:59 pm
Forum: Other questions
Topic: Getting the full topology (segments level) from hoc
Replies: 18
Views: 2463

Re: Getting the full topology (segments level) from hoc

You should check whether a section has a parent using sref.has_parent() before actually trying to reference the parent. Also when many sections are connected to the same rootnode or parent section, it may be useful to use sref.has_trueparent() and sref.trueparent(). Parent and trueparent can differ ...
by hines
Tue Jun 12, 2018 9:43 am
Forum: Other questions
Topic: Numerical methods in NEURON
Replies: 6
Views: 161

Re: Numerical methods in NEURON

In nrn/src/nrnoc/treeset.c there is a lengthy comment (beginning line 81) that discusses how NEURON is doing the calculation.
by hines
Fri Jun 08, 2018 8:24 am
Forum: Adding new mechanisms and functions to NEURON
Topic: Making a timer dummy cell for benchmarking
Replies: 3
Views: 152

Re: Making a timer dummy cell for benchmarking

ARTIFICIAL_CELL does not fit will with the concept of a ratio between integration time and real time since there is no integration per (fixed) time step but only computation on each incoming event. At the no incoming event extreme, there is no computation. However, if you replace ARTIFICIAL_CELL wit...
by hines
Fri May 25, 2018 1:16 am
Forum: NEURON + Python
Topic: Python NEURON
Replies: 15
Views: 11215

Re: Python NEURON

It turned out that to fix the import rxd problem for python 3.5, it was necessary to compile the neuron.rxd.geometry3d cython constructed
cpp files using Microsoft visual c. That is now being done when distributions are constructed.
by hines
Tue Apr 10, 2018 4:47 am
Forum: NEURON + Python
Topic: Cannot get Vector.play() and NetCon/NetStim work with CVODE and SaveState.restore()
Replies: 4
Views: 232

Re: Cannot get Vector.play() and NetCon/NetStim work with CVODE and SaveState.restore()

I've reproduced the results of your code. An alternative to your fix using t.restore(0), which restores the event queue to the time of save. is to realize that the save phase did not have any knowledge of rv.play(t.ic._ref_amp, tv, 1) and in particular that on restore there needs to be an event for ...
by hines
Sat Apr 07, 2018 8:31 am
Forum: NEURON + Python
Topic: Cannot get Vector.play() and NetCon/NetStim work with CVODE and SaveState.restore()
Replies: 4
Views: 232

Re: Cannot get Vector.play() and NetCon/NetStim work with CVODE and SaveState.restore()

I'll need to look into this a bit more but for now I just want to caution that if SaveState is chosen so that events on the queue are part of the state, that one cannot in general set h.t = 0 because all the outstanding events will be delivered at a time after the save time. Also many ArtificialCell...
by hines
Wed Mar 28, 2018 4:18 pm
Forum: NEURON + Python
Topic: Truncation of floats upon loading .hoc file from ipython
Replies: 15
Views: 457

Re: Truncation of floats upon loading .hoc file from ipython

The problem remains after changing the init file as you suggested. ... now does not work anymore in an ipython console (without spyder, after reinstallation of neuron). The "embedded" variable is certainly the cause of failure to print due to import hoc being executed prior to import neuron. I did ...
by hines
Wed Mar 28, 2018 11:21 am
Forum: NEURON + Python
Topic: Truncation of floats upon loading .hoc file from ipython
Replies: 15
Views: 457

Re: Truncation of floats upon loading .hoc file from ipython

It would be interesting to see if the problem goes away by demanding that embedded = False in neuron/__init__.py . Ie. just add a
embedded = False
line after the check about whether the hoc module is already loaded.
by hines
Tue Mar 27, 2018 10:13 am
Forum: NEURON + Python
Topic: Truncation of floats upon loading .hoc file from ipython
Replies: 15
Views: 457

Re: Truncation of floats upon loading .hoc file from ipython

I believe the problem will resolve if you always import neuron prior to import hoc (import neuron also imports hoc so you can replace any import hoc with from neuron import hoc. The reason for this is the code in the neuron/__init__.py file that reads: if not embedded: try: # callback in place of ho...
by hines
Thu Mar 22, 2018 8:41 am
Forum: NEURON + Python
Topic: Truncation of floats upon loading .hoc file from ipython
Replies: 15
Views: 457

Re: Truncation of floats upon loading .hoc file from ipython

just to be clear about the difference between h and hoc in the neuron module... hines@hines-T7500:~$ python Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from neuron import h, hoc NEURON -- VERS...
by hines
Thu Mar 22, 2018 8:25 am
Forum: NEURON + Python
Topic: Truncation of floats upon loading .hoc file from ipython
Replies: 15
Views: 457

Re: Truncation of floats upon loading .hoc file from ipython

hoc.execute(1/2) prints ".5" in the working case, before returning 1 in the console. In spyder, it returns 1 without printing anything before. I'm guessing you mean hoc.execute('1/2') as otherwise it raises "NEURON: Expecting string argument" RuntimeError: hoc error I use from neuron import h and I...
by hines
Wed Mar 21, 2018 12:25 pm
Forum: NEURON + Python
Topic: Truncation of floats upon loading .hoc file from ipython
Replies: 15
Views: 457

Re: Truncation of floats upon loading .hoc file from ipython

I have not yet been able to reproduce the problem hines@hines-T7500:~/tmp$ ipython2 Python 2.7.12 (default, Dec 4 2017, 14:50:18) Type "copyright", "credits" or "license" for more information. IPython 5.2.2 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %qui...
by hines
Sun Mar 11, 2018 7:58 pm
Forum: UNIX/Linux
Topic: Invalid syntax in "hclass3.py to hclass3.pyc"
Replies: 1
Views: 233

Re: Invalid syntax in "hclass3.py to hclass3.pyc"

A similar issue was posted to https://github.com/nrnhines/nrn/issues/60 I'm getting the following error on Mac OS X High Sierra (Python 2.7.14 provided by pyenv), when compiling Neuron: byte-compiling /Users/werner/local/nrnnogui/lib/python2.7/site-packages/neuron/hclass3.py to hclass3.pyc File "/Us...