Search found 179 matches

by ramcdougal
Thu Jul 13, 2017 12:04 am
Forum: NEURON + Python
Topic: Any simple way to identify parent segment of point porcess
Replies: 8
Views: 11560

Re: Any simple way to identify parent segment of point porce

The last point is quite dificalt to realize, specificaly in reconstructed morphology with many compartments. It would be very useful if I could reach segments inside a section, like this soma = h.Segment() soma.nseg = 3 soma[0].cm = 0.1 soma[1].cm = 0.2 soma[2].cm = 0.3 Same for point process: dend...
by ramcdougal
Wed Jul 12, 2017 11:51 pm
Forum: NEURON + Python
Topic: Any simple way to identify parent segment of point porcess
Replies: 8
Views: 11560

Re: Any simple way to identify parent segment of point porce

Unfortunately, your code will create 30 synapses with tiny step, which will be attached to just 3 compartments. Computational overhead will be 30/3 = 10! The add_syn function only creates at most one synapse per segment... so if nseg=3, then it creates at most three synapses. The trick is that it a...
by ramcdougal
Mon Jul 10, 2017 9:49 pm
Forum: NEURON + Python
Topic: Any simple way to identify parent segment of point porcess
Replies: 8
Views: 11560

Re: Any simple way to identify parent segment of point porce

There's nothing wrong with having multiple AMPA channels on the same segment. It's generally best to keep issues of numerics (e.g. discretization into segments) separate from the description of your model (e.g. what synapses are where). That way, you can change the mesh (e.g. increasing nseg to get ...
by ramcdougal
Mon Jul 10, 2017 2:47 pm
Forum: NEURON + Python
Topic: Section of source for h. NetCon() in Python
Replies: 2
Views: 9658

Re: Section of source for h. NetCon() in Python

Actually, the error is not related directly to the sec=celllist .soma; that was correct. The convention in the NEURON documentation (and many others) is that [ and ] in the syntax specification is used to indicate optional parameters... i.e. the stuff inside the brackets can be included or not. In y...
by ramcdougal
Tue Jul 04, 2017 2:00 pm
Forum: NEURON + Python
Topic: nseg not a USEPROPERTY
Replies: 8
Views: 12554

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

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

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

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

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

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

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

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

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

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

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.