Search found 214 matches

by ramcdougal
Thu Apr 20, 2017 3:53 pm
Forum: Reaction-diffusion in NEURON
Topic: Absolute tolerance scale in RxD
Replies: 1
Views: 8969

Re: Absolute tolerance scale in RxD

I just added this functionality to the development branch. Get a copy via git clone https://github.com/ramcdougal/nrn.git and then compile as normal. Specify an atolscale when you define the rxd.Species, e.g. ca = rxd.Species(cyt, initial=0, atolscale=1e-3) (If you've already set cvode.atol to 1e-3,...
by ramcdougal
Mon Apr 17, 2017 3:04 pm
Forum: Reaction-diffusion in NEURON
Topic: Modeling extracellular space and a plasma membrane
Replies: 3
Views: 10764

Re: Modeling extracellular space and a plasma membrane

In order to think about extracellular space, we have to decide what volume we're interested in. NEURON traditionally has a concept of, e.g. "nao" which is the sodium concentration "just outside" the plasma membrane (whatever that means; think of it as the Frankenhauser-Hodgkin space). The thing abou...
by ramcdougal
Fri Mar 10, 2017 10:34 am
Forum: Other ways of using NEURON in neuroscience education
Topic: Running NEURON tutorials on webpage
Replies: 5
Views: 23578

Re: Running NEURON tutorials on webpage

Sounds like a great project! There are two main approaches that I'm aware of for sharing interactive NEURON simulations on the web: Approach 1: Jupyter notebook, GitHub, and MyBinder.org Jupyter notebook provides a rich web-based approach for running Python programs, including NEURON. Put the bulk o...
by ramcdougal
Thu Feb 02, 2017 1:55 pm
Forum: OS X
Topic: Error opening ModelView
Replies: 2
Views: 10027

Re: Error opening ModelView

This is fixed in the development version, but in brief: NEURON isn't recognizing your version of scipy and so it can't tell if it's new enough to use certain features, and so it's crashing. A work around is to edit the file /Applications/NEURON-7.4/nrn/lib/python/neuron/rxd/options.py using your fav...
by ramcdougal
Thu Jan 05, 2017 4:07 pm
Forum: NEURON + Python
Topic: PyNEURON and .mod files
Replies: 3
Views: 11284

Re: PyNEURON and .mod files

Personally I never use nrn_load_dll.

What I do:

Compile the files with mknrndll/nrnivmodl, and import neuron from the directory that contains the x86_64 (or whatever) folder. During the initial import, NEURON will load the previously compiled MOD files.
by ramcdougal
Tue Jan 03, 2017 10:37 am
Forum: NEURON + Python
Topic: Beginner needs help: Questions arise from tutorials
Replies: 5
Views: 10403

Re: Beginner needs help: Questions arise from tutorials

That code is supposed to multiply each point by a standard rotation matrix, see Wikipedia . You can find rotation matrices in any intro text on linear algebra. That said, the code you found isn't ideal. It's not optimal because: (1) a rotation of 0 swaps the x and y axes, (2) if self.all is a list (...
by ramcdougal
Tue Jan 03, 2017 10:25 am
Forum: NEURON + Python
Topic: Beginner needs help: Questions arise from tutorials
Replies: 5
Views: 10403

Re: Beginner needs help: Questions arise from tutorials

From the path adjustment: sys.path.append('/Applications/NEURON-7.3/nrn/lib/python') I gather you're running NEURON 7.3 on a Mac. Unless you have a strong reason for using 7.3 try updating to 7.4 (the current release version), and tell us if the problem persists. If so: what version of Python are yo...
by ramcdougal
Thu Sep 29, 2016 12:00 pm
Forum: NEURON + Python
Topic: Python object as argument of hoc function
Replies: 4
Views: 11199

Re: Python object as argument of hoc function

Object arguments (doesn't matter if HOC objects or Python objects) to HOC functions are accessed using positional notation with $o instead of just $. e.g. $o1 instead of $1. A complete example, where for laziness I define the HOC function via h(): from neuron import h # declare a HOC function that j...
by ramcdougal
Fri Jun 10, 2016 9:41 am
Forum: Employment and educational opportunities
Topic: Postdoc Postion: Multiscale Modeling Methods & Simulator Dev
Replies: 0
Views: 16423

Postdoc Postion: Multiscale Modeling Methods & Simulator Dev

Mosaic Multiscale Modeling Postdoctoral Fellowship available for combining cell biology (reaction-diffusion) and electrophysiology in the NEURON simulator (neuron.yale.edu). The position involves an unusual mix of software engineering and science, depending on the candidate’s background and interest...
by ramcdougal
Fri May 20, 2016 2:51 pm
Forum: NEURON + Python
Topic: Guidance on plotting cell's geometry in Python?
Replies: 4
Views: 8617

Re: Guidance on plotting cell's geometry in Python?

where I expect methods to be associated with the section objects and instead they're accessed through the hoc object (my terminology here might be wrong). Is there some guiding rule as to why this is the case? This is a legacy artifact of NEURON's transition from a HOC-based interface which did not...
by ramcdougal
Fri May 20, 2016 9:08 am
Forum: NEURON + Python
Topic: import swc file for network simulation
Replies: 2
Views: 8885

Re: import swc file for network simulation

For an example addressing both (1) and (2), see the load_swc function in https://github.com/ahwillia/PyNeuron-Toolbox/blob/master/PyNeuronToolbox/morphology.py You linked to a prior thread about using SWC morphologies. Remember Ted's cautions : always check the morphology to make sure it is reasonab...
by ramcdougal
Thu May 05, 2016 10:32 am
Forum: NEURON + Python
Topic: AP propagates too slow
Replies: 7
Views: 6113

Re: AP propagates too slow

To set the temperature via Python:

Code: Select all

h.celsius = 20
With important exceptions, the Python interface is essentially the same as the HOC interface, but prefaced with an "h."
by ramcdougal
Mon May 02, 2016 4:38 pm
Forum: UNIX/Linux
Topic: Issue compiling ...geometry3d/surfaces.cpp NEURON v7.4
Replies: 3
Views: 10468

Re: Issue compiling ...geometry3d/surfaces.cpp NEURON v7.4

Here's a patch that fixes the issue present when compiling with newer versions of cython: it changes the tuple position into a list. diff -r b8295be34ae5 share/lib/python/neuron/rxd/geometry3d/surfaces.pyx --- a/share/lib/python/neuron/rxd/geometry3d/surfaces.pyx Mon May 02 14:29:44 2016 +0200 +++ b...
by ramcdougal
Sat Apr 30, 2016 9:27 am
Forum: NEURON + Python
Topic: AP propagates too slow
Replies: 7
Views: 6113

Re: AP propagates too slow

Is the morphology (in particular, the diameter) the same?
by ramcdougal
Tue Apr 26, 2016 3:41 pm
Forum: NEURON + Python
Topic: Export a subset of loaded morphology
Replies: 3
Views: 5814

Re: Export a subset of loaded morphology

Almost. In my example, parent is the index of the parent section; parent_loc is the normalized position within that section. Thus: parent_sec = sec_list[sd['parent']] # not parent_loc, grab from sec_list not sec sec.connect(parent_sec(sd['parent_loc']), sd['section_orientation']) This last line is i...