Search found 153 matches

by ramcdougal
Thu Aug 29, 2019 10:45 am
Forum: Other ways of using NEURON in neuroscience education
Topic: Running NEURON tutorials on webpage
Replies: 5
Views: 20567

Re: Running NEURON tutorials on webpage

We've started a process of redoing those tutorials, which are pretty old. The new versions use more modern idioms and come as Jupyter notebooks. We haven't moved these to the website because we don't have a full replacement, but here's a few: https://neuron.yale.edu/ftp/ramcdougal/pythontutorial.ipy...
by ramcdougal
Thu Aug 29, 2019 10:15 am
Forum: Other questions
Topic: debugging/profiling NEURON execution
Replies: 3
Views: 230

Re: debugging/profiling NEURON execution

Are you trying to debug NEURON itself or a NEURON simulation? For debugging NEURON simulations written in Python, you can use pdb as with any other Python code. A quick search will lead you to many pdb tutorials. For debugging NEURON simulations written in HOC... there's no equivalent. Going forward...
by ramcdougal
Thu Aug 29, 2019 9:50 am
Forum: NEURON + Python
Topic: Control a simulation step by step
Replies: 2
Views: 202

Re: Control a simulation step by step

Calling h.fadvance() advances the simulation by one timestep. When using fixed-step integration, the time step size is controllable by setting h.dt ; by default it is 1/40 ms. When controlling a simulation in this way, before beginning your advances, you must explicitly initialize the simulation wit...
by ramcdougal
Wed Aug 21, 2019 3:21 pm
Forum: NEURON + Python
Topic: Does Section have something like `id` attribute?
Replies: 2
Views: 198

Re: Does Section have something like `id` attribute?

Internally, the Sections are stored in a linked list. There is thus no direct, consistent-across-runs section indexing scheme... but as you've observed, there's no advantage for NEURON storing such a list since you can create it quickly in the non-parallel case : seclist = list(h.allsec()) Once you ...
by ramcdougal
Mon Jul 01, 2019 11:12 am
Forum: OS X
Topic: Can't load from neuron.rxd.morphology
Replies: 1
Views: 426

Re: Can't load from neuron.rxd.morphology

Unfortunately, this isn't in 7.7; we considered it an internal class and didn't realize people were using it otherwise. The general workaround is to use the corresponding section method trueparentseg (there's also a parentseg); e.g. >>> from neuron import h >>> soma = h.Section(name='soma') >>> dend...
by ramcdougal
Thu Jun 06, 2019 10:25 am
Forum: Getting started
Topic: Accessing the current between extracellular layers
Replies: 6
Views: 700

Re: Accessing the current between extracellular layers

Are you trying to simulate ephaptic coupling or extracellular diffusion of ion concentrations in the extracellular space? There are currently at least two models in ModelDB that use NEURON for ephaptic coupling: http://identifiers.org/modeldb/3676 and http://identifiers.org/modeldb/240957 (The rxd m...
by ramcdougal
Sat May 18, 2019 2:38 pm
Forum: NEURON + Python
Topic: Adex neuron in neuron python
Replies: 5
Views: 706

Re: Adex neuron in neuron python

The literal translation is adapex=h.ADEX(0.5) Since this is technically a point process, the 0.5 means it gets associated with the middle of some section, the so called currently accessed section. This is fine, but in Python we can be more explicit about which section, here mysec: adapex=h.ADEX(myse...
by ramcdougal
Tue May 07, 2019 1:55 pm
Forum: Reaction-diffusion in NEURON
Topic: Questions about Calcium Waves in RxD
Replies: 2
Views: 697

Re: Questions about Calcium Waves in RxD

I've added a full working code (and the associated image output) to the calcium wave rxd tutorial page: https://neuron.yale.edu/neuron/docs/reaction-diffusion-calcium-wave There's not much in the way of explanation yet, but hopefully after working through the rest of the existing tutorials ( https:/...
by ramcdougal
Mon Apr 22, 2019 4:49 pm
Forum: UNIX/Linux
Topic: No module named hoc37
Replies: 10
Views: 1858

Re: No module named hoc37

Two questions: Does NEURON work from a regular python prompt (i.e. not Spyder) What is the full NEURON part of your PYTHONPATH? Because of reasons NEURON installs two versions of the library. Only one has the "missing" file. In particular, on my machine the two paths are: /usr/local/nrn/lib/python/n...
by ramcdougal
Fri Mar 01, 2019 11:33 am
Forum: Reaction-diffusion in NEURON
Topic: USEION in mod files for RxD species I created
Replies: 3
Views: 695

Re: USEION in mod files for RxD species I created

Ted raises good points. The underlying issue though is that if you run the straightforward translation of that mod file, you'll get a maximum value of 1 (assuming your concentrations are below 1). Why 1? It has to do with the order of events during initialization: NEURON sets concentrations to 1 unl...
by ramcdougal
Fri Mar 01, 2019 10:00 am
Forum: MSWin
Topic: Windows 10 install problem. Path issue?
Replies: 1
Views: 761

Re: Windows 10 install problem. Path issue?

To fix, add the following two paths to your system PATH environment variable (for instructions on how to modify PATH, see https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/ ): c:\nrn\bin c:\nrn\mingw\usr\bin We've identified the source of the 1024 limit, and this should be fixed...
by ramcdougal
Mon Feb 18, 2019 4:57 pm
Forum: Reaction-diffusion in NEURON
Topic: RXD lower concentration limit?
Replies: 2
Views: 612

Re: RXD lower concentration limit?

This is likely due to a previously under-appreciated detail in the numerical methods used for 3D simulation. In particular, we use scipy.sparse.linalg.bicgstab with a tolerance of 1e-5 to solve a matrix problem. This should have been connected to the atol used elsewhere*, but it is not. For now, you...
by ramcdougal
Tue Dec 04, 2018 7:05 am
Forum: NEURON + Python
Topic: Using VecStim() with CVode on
Replies: 3
Views: 1081

Re: Using VecStim() with CVode on

Adaptive integration chooses timesteps to constrain error.

In particular, unlike fixed step integration, it will adapt its timesteps to handle events at the time received and not shift them or group them.
by ramcdougal
Mon Nov 26, 2018 7:28 pm
Forum: NEURON + Python
Topic: Accessing inf_hh and tau_hh in the hh mechanism
Replies: 6
Views: 1486

Re: Accessing inf_hh and tau_hh in the hh mechanism

Conceptually, you are correct. For memory reasons, however, NEURON's hh.mod doesn't actually store those values since they are only useful for computing one location at one time point. Instead, a GLOBAL value is used, meaning that there is only one memory location used for every spatial point (diffe...
by ramcdougal
Mon Nov 26, 2018 6:01 pm
Forum: NEURON + Python
Topic: Accessing inf_hh and tau_hh in the hh mechanism
Replies: 6
Views: 1486

Re: Accessing inf_hh and tau_hh in the hh mechanism

Globals are accessed globally; i.e. through the h object:

Code: Select all

from neuron import h
soma = h.Section(name='soma')
soma.insert('hh')
print(h.htau_hh)
print(h.hinf_hh)