Search found 205 matches

by ramcdougal
Tue Jul 04, 2017 2:00 pm
Forum: NEURON + Python
Topic: nseg not a USEPROPERTY
Replies: 8
Views: 13920

Re: nseg not a USEPROPERTY

NEURON's directory information is technically incomplete here, but please don't use section.diam as it is potentially confusing: diam is naturally a property of a segment not of a section, so reading section.diam will return the middle diameter and writing it will set all segments: >>> dend = h.Sect...
by ramcdougal
Mon Jun 26, 2017 1:57 pm
Forum: NEURON + Python
Topic: DIfferent results with Neuron + Python and with HOC
Replies: 3
Views: 10179

Re: DIfferent results with Neuron + Python and with HOC

In the Python version, your current clamp does not do what you think it does. You write: istim = h.IClamp(1.0, dend) which places the current clamp at soma(1) not dend(1). The correct (link to docs) thing to do is: istim = h.IClamp(dend(1)) What's going on? The "dend" parameter you're sending in is ...
by ramcdougal
Wed Jun 21, 2017 12:33 pm
Forum: Reaction-diffusion in NEURON
Topic: Running pde solver more than once
Replies: 4
Views: 10418

Re: Running pde solver more than once

I assume you're referring to the Scalar Bistable Wave example in the reaction-diffusion documentation. My guess is that you're putting the entire code into a single Jupyter cell and rerunning. Should this work? Yes, but apparently it's remembering parts of the configuration from one run to the next ...
by ramcdougal
Fri Jun 09, 2017 10:49 pm
Forum: NEURON + Python
Topic: Creating NetCon with null source in NEURON+Python
Replies: 10
Views: 15168

Re: Creating NetCon with null source in NEURON+Python

h.FInitializeHandler normally takes a function that is to be called whenever NEURON initializes; i.e. we would normally say def my_initializer(): # do stuff here... fih = h.FInitializeHandler(my_initializer) To handle situations where we want to always send the function an argument or arguments, ins...
by ramcdougal
Wed Apr 26, 2017 3:10 pm
Forum: Reaction-diffusion in NEURON
Topic: Modeling extracellular space and a plasma membrane
Replies: 3
Views: 10618

Re: Modeling extracellular space and a plasma membrane

I pushed a version that supports extracellular diffusion to the development branch at http://github.com/ramcdougal/nrn . To try it, clone from there, compile, and run the code below. You should get two windows, one that shows a red square on a blue background (the initial condition), and one where d...
by ramcdougal
Sat Apr 22, 2017 11:36 pm
Forum: UNIX/Linux
Topic: Problem loadg modules in Neuron Python
Replies: 6
Views: 11267

Re: Problem loadg modules in Neuron Python

A few questions:

(1) How did you install NEURON? (e.g. from source or from a binary? On what platform?)
(2) Do you get the same version printout if you just run nrniv?
(3) If you run, "nrngui -python" (without the quotes) and import neuron, does it work?
by ramcdougal
Thu Apr 20, 2017 3:53 pm
Forum: Reaction-diffusion in NEURON
Topic: Absolute tolerance scale in RxD
Replies: 1
Views: 8880

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: 10618

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: 23291

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: 9900

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: 11155

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: 10282

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: 10282

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: 11069

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: 16203

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...