Search found 173 matches

by ramcdougal
Mon Aug 13, 2018 1:06 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: A question about USEION statement
Replies: 1
Views: 1175

Re: A question about USEION statement

Currents of the same type from different mechanisms add.

You can test this yourself by creating two trivial mod files that generate a constant current, and measuring the current when one vs both are inserted.
by ramcdougal
Thu Aug 09, 2018 12:36 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: HOC kernel for Jupyter
Replies: 3
Views: 1852

Re: HOC kernel for Jupyter

If you're working on a HOC kernel, I also encourage this... But: (1) Consider teaching in Python instead of HOC. That's what we do for the official NEURON courses. The Python programmer's reference is not only the default version, but it's also more up-to-date and has more examples. (2) As long as y...
by ramcdougal
Tue Aug 07, 2018 7:48 am
Forum: NEURON + Python
Topic: Neuron 7.5 + Python 3.7
Replies: 2
Views: 3224

Re: Neuron 7.5 + Python 3.7

Upgrade to NEURON 7.6.1 (the current release version) to use Python 3.7.

Older versions of NEURON are not compatible with Python 3.7.
by ramcdougal
Tue Jul 31, 2018 4:57 am
Forum: Anatomically detailed models
Topic: Changing diameters of reconstructed neurons
Replies: 5
Views: 1923

Re: Changing diameters of reconstructed neurons

My mistake, sorry. I made that post on my phone without checking it.

You're right. diam3d is ready only. Use pt3dchange to set the diameter: the

Code: Select all

forall { 
  for (j = 0; j < n3d(); j+=1) { 
    pt3dchange(j, diam3d(j)*1.0)
  } 
} 
by ramcdougal
Mon Jul 30, 2018 6:20 am
Forum: Anatomically detailed models
Topic: Changing diameters of reconstructed neurons
Replies: 5
Views: 1923

Re: Changing diameters of reconstructed neurons

Use diam3d instead of diam, and forall sections adjust indices from 0 to n3d -1, inclusive. EDIT: The idea is right but this code is wrong. diam3d is read only and diameters most he changed with pt3dchange. See my next post. forall { for (j = 0; j < n3d(); j+=1) { diam3d(j) = diam3d(j)*1.0 } } There...
by ramcdougal
Sun Jul 29, 2018 8:28 pm
Forum: General questions and discussions about computational neuroscience
Topic: AMR for increasing computation speed
Replies: 2
Views: 3020

Re: AMR for increasing computation speed

Not exactly what you're looking for, but check out Rempe and Chopp 2006, A Predictor‐Corrector Algorithm for Reaction‐Diffusion Equations Associated with Neural Activity on Branched Structures. In particular, section 8 is entitled "spatial adaptivity." They demonstrate this on a morphologically deta...
by ramcdougal
Thu Jul 19, 2018 3:48 am
Forum: Anatomically detailed models
Topic: Use import3D_swc_read to read the morphology from swc file
Replies: 2
Views: 1475

Re: Use import3D_swc_read to read the morphology from swc file

Every segment corresponds to a location where membrane potential is computed. In particular, this is a distinct concept from the 3D shape of the cell. Segments can contain arbitrarily many 3D points and the surface area, etc for that segment will be computed correctly. In Python with NEURON 7.5+, yo...
by ramcdougal
Mon Jun 11, 2018 5:25 pm
Forum: Anatomically detailed models
Topic: Making whole cells out of Mcintyre myelinated axon model (2002) and testing short and long-term plasticity between them
Replies: 15
Views: 4251

Re: Making whole cells out of Mcintyre myelinated axon model (2002) and testing short and long-term plasticity between t

In addition to the text editors that ted mentioned, consider Visual Studio Code. It's free and runs on all platforms. More importantly for NEURON: the first time you open a HOC or MOD file, it will prompt you to install an extension that provides NEURON syntax highlighting.
by ramcdougal
Mon Jun 11, 2018 1:24 pm
Forum: NEURON + Python
Topic: Neuron code
Replies: 20
Views: 6745

Re: Neuron code

Ion channel genealogy lists 524 NEURON calcium channel models, not all distinct. If you click that link, you'll see them grouped by similarity. Clicking on an individual model (dot) in the figure will load it in the channel details pane on the bottom right. The info tab (opened by default) contains ...
by ramcdougal
Mon Jun 11, 2018 12:34 pm
Forum: NEURON + Python
Topic: Neuron code
Replies: 20
Views: 6745

Re: Neuron code

Note that Hodgkin and Huxley considered only the role of sodium, potassium, and leak currents. In particular, it follows that the hh mechanism does not generate a calcium current.
by ramcdougal
Mon Jun 11, 2018 11:28 am
Forum: Reaction-diffusion in NEURON
Topic: Custom reaction rates
Replies: 1
Views: 1269

Re: Custom reaction rates

If you want to customize the dynamics to be (potentially) not-mass-action, use the custom_dynamics=True keyword argument: reaction = rxd.Reaction(2 * hydrogen + oxygen > water, reac_speed, custom_dynamics=True) (What you were getting was mass action where the "constant" part of the mass action was r...
by ramcdougal
Fri Jun 08, 2018 4:09 pm
Forum: NEURON + Python
Topic: Neuron code
Replies: 20
Views: 6745

Re: Neuron code

Not having seen your nadifl.mod, it's impossible to say for certain, but if we consider this file of the same name, the interesting part is the KINETIC block: KINETIC conc { COMPARTMENT PI*diam*diam/4 {nai} LONGITUDINAL_DIFFUSION D {nai} ~ nai << (-ina/(FARADAY)*PI*diam*(1e4)) } The COMPARTMENT line...
by ramcdougal
Fri Jun 08, 2018 2:26 pm
Forum: NEURON + Python
Topic: Neuron code
Replies: 20
Views: 6745

Re: Neuron code

The equations for nadifl and kdifl are in the mod files that you're using; they're not part of NEURON itself. Without seeing them, they are likely to just be LONGITUDINAL_DIFFUSION based mechanisms, possibly with radial diffusion as well. If by "small dimension" you're talking about the 0.1 microns ...
by ramcdougal
Thu Jun 07, 2018 9:15 pm
Forum: NEURON + Python
Topic: Neuron code
Replies: 20
Views: 6745

Re: Neuron code

This is probably not doing what you meant to do, although I'm not entirely sure what your question is. The following HOC code (did you want to use Python instead of HOC?) soma { nseg = 10000 L = 1// [µm] length diam = 0.1 // [µm] diameter creates a single section called soma with total length of jus...
by ramcdougal
Mon May 28, 2018 6:47 pm
Forum: NEURON + Python
Topic: Best way(s) to advance() in Python
Replies: 3
Views: 1947

Re: Best way(s) to advance() in Python

Minor comments: the inside of proc advance should invoke fadvance not advance. Also note you can get slightly more readable code by using a multiline string: h(r""" proc advance() { fadvance() m1 = IntFire1[0].M() }""") The r in front of the multi-line string opening is not needed here, but allows y...