Search found 225 matches

by ramcdougal
Wed Jun 09, 2021 11:59 am
Forum: NEURON + Python
Topic: hh.mod + Python + membrane potential at several points of the soma
Replies: 3
Views: 73

Re: hh.mod + Python + membrane potential at several points of the soma

I suggest in Python using the object-oriented form ( h.hh ) rather than the string ( "hh" ) because it gives you an object whose properties you can explore (although your exploration options depend on whether or not you have the nmodl Python module installed...); i.e. soma.insert(h.hh) You...
by ramcdougal
Thu Apr 15, 2021 12:33 am
Forum: NEURON + Python
Topic: Simulation Setup when using a List of NetCons, VecStims and Exp2Syn for multiple spike train stimulation
Replies: 3
Views: 392

Re: Simulation Setup when using a List of NetCons, VecStims and Exp2Syn for multiple spike train stimulation

I haven't wrapped my head around all of this, but here's a few points to help: I'm not sure I understand your placement array, but there's a comment "L = Length of each segment = 1/nseg"... the length of a segment is the length of the section (which presumably isn't 1 micron) divided by th...
by ramcdougal
Wed Mar 24, 2021 8:34 pm
Forum: NEURON Announcements
Topic: 8.0 release plan?
Replies: 3
Views: 357

Re: 8.0 release plan?

We don't have a timeline for an official 8.0 release yet, but:

There was an alpha release in January: https://github.com/neuronsimulator/nrn/ ... s/tag/8.0a

On mac and linux, you can get the nightly development build via: pip install neuron-nightly
by ramcdougal
Tue Mar 16, 2021 11:47 am
Forum: Adding new mechanisms and functions to NEURON
Topic: calling a function from NMODL
Replies: 10
Views: 475

Re: calling a function from NMODL

It would be cleaner to have the Python function run at every timestep using a CVode.extra_scatter_gather and then just transfer values to NMODL (using pointers or directly; both should work.)

You could probably get the call from NMODL to work, but that would require a VERBATIM block.
by ramcdougal
Fri Mar 05, 2021 12:13 pm
Forum: Getting started
Topic: Help with fixing errors to run modeldb neurons
Replies: 6
Views: 382

Re: Help with fixing errors to run modeldb neurons

From StackOverflow , it looks like that error could occur from XCode not matching the system version. Try the instructions in the first answer there to see if updating XCode resolves the issue. (The discussion at the link was for Catalina not Big Sur, but presumably the update Xcode advice should st...
by ramcdougal
Thu Mar 04, 2021 4:20 pm
Forum: Anatomically detailed models
Topic: NEURON changes dendrite diameter to default value
Replies: 4
Views: 397

Re: NEURON changes dendrite diameter to default value

Thank you for bringing this to our attention. This has now been fixed in the development version: https://github.com/neuronsimulator/nrn/commit/ec1d362eeaaf4fae4d59e1dd91a1872b12d87e53 The underlying issue was that 3D diameters are internally stored separately from the diameters reported at the cent...
by ramcdougal
Mon Mar 01, 2021 3:20 pm
Forum: Reaction-diffusion in NEURON
Topic: Running pde solver more than once
Replies: 6
Views: 11814

Re: Running pde solver more than once

When you change f_rate and b_rate , NEURON interprets that as changing the model, triggering a recompilation. If instead you used an rxd.Parameter , that just changes a parameter value, requiring no change to the model. See the bottom of this example which covers both changing initial conditions and...
by ramcdougal
Mon Mar 01, 2021 2:15 pm
Forum: NEURON + Python
Topic: Update to __init__.py?
Replies: 1
Views: 194

Re: Update to __init__.py?

As this is running on your own machine, consider updating your version of NEURON. The current release is 7.8.2.

You can get it from the NEURON website or directly from GitHub at https://github.com/neuronsimulator/nrn/ ... /tag/7.8.2
by ramcdougal
Thu Feb 25, 2021 7:49 pm
Forum: Anatomically detailed models
Topic: Loading a morphology as a hoc file
Replies: 9
Views: 439

Re: Loading a morphology as a hoc file

If you want to create a CellBuilder from a HOC morphology, you can load the HOC morphology, then open a CellBuilder, click the Management tab, then Import - top level. Confirm by clicking "go ahead and import" and then you can work with it in the CellBuilder.
by ramcdougal
Thu Feb 25, 2021 9:06 am
Forum: Anatomically detailed models
Topic: Loading a morphology as a hoc file
Replies: 9
Views: 439

Re: Loading a morphology as a hoc file

Can you expand your comment? What do you get and how is it different from what you expected?

If there's a HOC file morphology, you can load it from the GUI or from e.g. `h.load_file("my_morphology.hoc")`
by ramcdougal
Wed Dec 30, 2020 5:24 pm
Forum: NEURON + Python
Topic: Record and fadvance instead of run
Replies: 2
Views: 434

Re: Record and fadvance instead of run

Vectors must be initialized after calling record before advancing . Your other code works with h.run() because a run is basically an h.finitialize(h.v_init) combined with an h.continuerun(h.tstop) . The solution is to declare your timeVector before the h.finitialize call, i.e. something like: timeV...
by ramcdougal
Mon Jul 20, 2020 1:34 pm
Forum: NEURON + Python
Topic: color or color_list procedures in PlotShape
Replies: 5
Views: 999

Re: color or color_list procedures in PlotShape

Hmmm... looks like that example depends on a change introduced about a month ago... so it's available in the "pip install" version for mac/linux or the windows nightly build . (Don't try to pip install on Windows, that will give a VERY old version of NEURON.) Sorry about that. So I guess t...
by ramcdougal
Tue Jul 07, 2020 4:48 pm
Forum: NEURON + Python
Topic: color or color_list procedures in PlotShape
Replies: 5
Views: 999

Re: color or color_list procedures in PlotShape

Unfortunately the .plot for both matplotlib and plotly (available in 8.0 development version) does not currently support the .color or .color_list values and instead always color based on the value of some variable (v, by default). (Note that you can use .mark as in the documentation to highlight sp...
by ramcdougal
Mon Jul 06, 2020 9:28 am
Forum: NEURON Announcements
Topic: How to cite NEURON
Replies: 2
Views: 27378

Re: How to cite NEURON

Thanks for pointing this out.

The old link works now too.
by ramcdougal
Mon Jun 29, 2020 12:38 pm
Forum: NEURON + Python
Topic: Error recording channel current by passing string to Vector.record
Replies: 3
Views: 799

Re: Error recording channel current by passing string to Vector.record

Python provides a standard way of using a string to grab a property, namely the getattr function. e.g. if you have a section called soma and you wanted to get a pointer to a specific variable var from the 0.5 location, you could do ptr = getattr(soma(0.5).hh, f'_ref_{var}') Similarly, a second getat...