Search found 215 matches
- Mon Jan 13, 2020 1:43 pm
- Forum: NEURON + Python
- Topic: different section names, morphology - h.Section
- Replies: 2
- Views: 794
Re: different section names, morphology - h.Section
Specify the name attribute when creating a section to give them meaningful names: soma = h.Section(name='soma') Specify both name and cell (and give the cell a reasonable __repr__) for meaningful dot notation: from neuron import h class MyCell: def __repr__(self): return 'MyCell[{}]'.format(self._id...
- Mon Jan 13, 2020 12:39 pm
- Forum: NEURON + Python
- Topic: Finding middle of a section
- Replies: 4
- Views: 993
Re: Finding middle of a section
So it's best to call h.define_shape() preemptively, right after all sections have been created, connected, assigned their geometries via L and diam or pt3dadd statements, and their nseg parameters have been set. And after you do that, every section will have its own pt3d data that will include the ...
- Mon Jan 13, 2020 11:38 am
- Forum: NEURON + Python
- Topic: Finding middle of a section
- Replies: 4
- Views: 993
Re: Finding middle of a section
Neither of those strategies necessarily identifies the coordinates of the center of the section. The second solution doesn't necessarily lead to a point on the section (consider a circular section with evenly spaced 3D points; it would find the center of the circle). The explanation is simple: 3D po...
- Fri Jan 03, 2020 12:59 pm
- Forum: Reaction-diffusion in NEURON
- Topic: Cell membrane with PMCA pump
- Replies: 3
- Views: 1030
Re: Cell membrane with PMCA pump
Are you trying to do this with a network model or a single cell? Do you care what happens to the extracellular concentration or do you want to treat that as constant? A way of doing this is to an rxd.Extracellular domain and to use the rxd.membrane() geometry for the plasma membrane. The following e...
- Wed Jan 01, 2020 2:13 pm
- Forum: NEURON + Python
- Topic: Associative arrays in HOC
- Replies: 5
- Views: 1200
Re: Associative arrays in HOC
As long as Python is installed, you can use Python dictionaries from inside HOC: oc>objref py, d oc>py = new PythonObject() oc>d = py.dict() oc>d.__setitem__("axon", 100) NULLobject oc>d.__setitem__("soma", 10) NULLobject oc>d.get("soma") 10 oc>d.get("axon") 1...
- Wed Jan 01, 2020 2:00 pm
- Forum: NEURON + Python
- Topic: Converting HOC extracellular to Python
- Replies: 3
- Views: 963
Re: Converting HOC extracellular to Python
In HOC, if foo is an array, assigning to foo is a syntactic shortcut for assigning to foo[0].
- Tue Dec 17, 2019 5:13 pm
- Forum: UNIX/Linux
- Topic: CentOS with RxD and NEURON build from source
- Replies: 1
- Views: 867
Re: CentOS with RxD and NEURON build from source
Looks like something went wrong with the Cython part of the compilation (which provides voxelize2). If you're using Centos 7 and Python 3.4, try recompiling after something like: yum -y install python34-Cython (I understand you may not have sudo rights on this machine, but you ought to be able to in...
- Wed Dec 11, 2019 12:09 pm
- Forum: Anatomically detailed models
- Topic: Precise 3D morphology
- Replies: 6
- Views: 2277
Re: Precise 3D morphology
NEURON doesn't use cylinders. It uses truncated cones ("frusta of a right circular cone") for the electrophysiology. For 3D reaction-diffusion domains, we use essentially the algorithm of McDougal et al., 2013 to convert Neurolucidia-style point-diameter measurements into watertight surfac...
- Mon Nov 25, 2019 1:36 pm
- Forum: Other questions
- Topic: Could neuron be installed on Windows/MacOS through the command line?
- Replies: 2
- Views: 764
Re: Could neuron be installed on Windows/MacOS through the command line?
We have two active projects that may be of interest to you: (1) pip installable wheels at https://github.com/neuronsimulator/nrn/tree/setuppy/dist Important: this is a work in progress. At this writing, neither nrnivmodl nor the GUI work. If you don't need those though, you should be good. (The nrni...
- Fri Nov 22, 2019 1:28 pm
- Forum: NEURON + Python
- Topic: Is it possible to run nrnivmodl from python?
- Replies: 4
- Views: 1566
Re: Is it possible to run nrnivmodl from python?
As long as you're using NEURON 7.7+ installed by the regular installer, just use nrnivmodl on every platform. The Linux (at least with the deb, didn't check rpm), Windows, and macOS installers all default to putting nrnivmodl on the path. In Windows, in particular, one can open a regular cmd or Powe...
- Tue Nov 12, 2019 12:28 pm
- Forum: Reaction-diffusion in NEURON
- Topic: The equilibrium between the FS and external
- Replies: 20
- Views: 3751
Re: The equilibrium between the FS and external
Similarly, NEURON automatically updates Nernst potentials for species defined using rxd. For more on the math governing Nernst Potentials, see this entry on Wikipedia. Ion current through a channel is typically proportional to the difference between the membrane potential and the corresponding Nerns...
- Tue Nov 12, 2019 11:17 am
- Forum: Reaction-diffusion in NEURON
- Topic: length scales and SparseEfficiencyWarning
- Replies: 5
- Views: 1214
Re: length scales and SparseEfficiencyWarning
The first issue should go away when you upgrade to 7.7. As far as tolerance goes: if you're using variable step, you can specify an atolscale when you declare the Species... I don't know that that's related, but I'm mentioning it just in case. As of this time, we have no automatic advice for automat...
- Tue Oct 29, 2019 9:41 am
- Forum: Reaction-diffusion in NEURON
- Topic: Node.d (Diffusion) for Node3D objects
- Replies: 2
- Views: 953
Re: Node.d (Diffusion) for Node3D objects
It looks like when going from 7.6.x to 7.7.x we lost the ability to have non-uniform diffusion constants in 3D. Sorry about that; we're working on a fix. I'm not sure I fully understand your other observations; could you explain more? With 7.7.x, crxd and rxd are now the same thing... that is, rxd g...
- Tue Oct 29, 2019 9:21 am
- Forum: NEURON + Python
- Topic: Parallel NMODL array assignment
- Replies: 8
- Views: 1919
Re: Parallel NMODL array assignment
The above code requires NEURON 7.7.2 or newer.
Older versions won't recognize _ref_foo, and instead need to have the pointer set using h.setpointer; i.e. replace the for loop in the above with:
Older versions won't recognize _ref_foo, and instead need to have the pointer set using h.setpointer; i.e. replace the for loop in the above with:
Code: Select all
# tell each pp about the pointer
for pp in pps:
h.setpointer(ptr, 'foo', pp)
- Mon Oct 28, 2019 6:05 pm
- Forum: NEURON + Python
- Topic: Parallel NMODL array assignment
- Replies: 8
- Views: 1919
Re: Parallel NMODL array assignment
You can assign your data to a numpy array, get a pointer to the numpy array using neuron.numpy_element_ref, send that pointer to all point processes (this is fast... there's no copying of data), and then have the point process read from the array using a single VERBATIM line. Our driving Python prog...