Search found 121 matches

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: 10
Views: 193

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

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

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

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

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

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

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

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...
by ramcdougal
Thu May 10, 2018 5:45 pm
Forum: Reaction-diffusion in NEURON
Topic: Negative concentrations
Replies: 5
Views: 187

Re: Negative concentrations

I second Ted's point about the need for state-specific error tolerance scale multipliers. Unfortunately, the rxd state variables are not integrated into the VariableStepControl GUI's analysis at this time. You can, however, specify a species-specific atolscale. The rxd.Species constructor prototype ...
by ramcdougal
Mon May 07, 2018 12:51 pm
Forum: NEURON + Python
Topic: gui not accessible and graphs not updating while running simulations from Python
Replies: 8
Views: 313

Re: gui not accessible and graphs not updating while running simulations from Python

This is still a bit of a hack, but it should keep the GUI responsive and avoid the memory issue.

Before you do your h.run() (or equivalent), do:

Code: Select all

h('''
proc advance() {
    fadvance()
    nrnpython("")
}
''')
by ramcdougal
Mon May 07, 2018 12:46 pm
Forum: Reaction-diffusion in NEURON
Topic: Negative concentrations
Replies: 5
Views: 187

Re: Negative concentrations

Also: do the concentrations go negative with fixed-step integration?
by ramcdougal
Mon May 07, 2018 12:44 pm
Forum: Reaction-diffusion in NEURON
Topic: Negative concentrations
Replies: 5
Views: 187

Re: Negative concentrations

Not directly. If you're not using mass-action, it's possible to write reactions that mathematically demand concentrations go negative. Can you tell us more about your reaction specification? Assuming some are not mass action, have you checked to make sure the reaction rates are not such that the con...
by ramcdougal
Tue Apr 24, 2018 11:01 am
Forum: NEURON + Python
Topic: gui not accessible and graphs not updating while running simulations from Python
Replies: 8
Views: 313

Re: gui not accessible and graphs not updating while running simulations from Python

This windows-specific bug also seems to only occur if the simulation is run from the terminal or from a script. If you were to click the "Run" button on the GUI (e.g. in Tools - Run Control), the graphs should update etc during the simulation. That may or may not be useful to you.
by ramcdougal
Tue Apr 24, 2018 10:53 am
Forum: Reaction-diffusion in NEURON
Topic: basic questions on RxD
Replies: 1
Views: 137

Re: basic questions on RxD

(1) To get a concentration pointer in Python, use ._concentration_ref ; you can pass that to Vector.record . An example follows: from neuron import h, rxd from matplotlib import pyplot h.load_file('stdrun.hoc') dend = h.Section(name='dend') cyt = rxd.Region([dend], name='cyt', nrn_region='i') ca = r...
by ramcdougal
Thu Apr 19, 2018 9:29 am
Forum: NEURON + Python
Topic: gui not accessible and graphs not updating while running simulations from Python
Replies: 8
Views: 313

Re: gui not accessible and graphs not updating while running simulations from Python

Point of clarification: are you saying it runs without memory problems if you don't use that workaround, but crashes when you do? How long does each simulation run (h.tstop) for, and how many simulations are you running? If you would like, I can take a look at your code to try to track down the memo...