Search found 244 matches

by ramcdougal
Mon Nov 14, 2022 2:56 pm
Forum: UNIX/Linux
Topic: [SOLVED] Unable to run nrniv -python with NEURON 8.0.0 installed via pip
Replies: 6
Views: 86

Re: Unable to run nrniv -python with NEURON 8.0.0 installed via pip

Not sure why it doesn't like nrniv -python , but launching nrniv when you really want to run python complicates things unnecessarily. As long as your script initializes MPI before setting up the model, either via mpi4py or via: h.nrnmpi_init() it suffices to just: mpiexec -n 2 python run_model_to_st...
by ramcdougal
Mon Sep 19, 2022 3:05 pm
Forum: Reaction-diffusion in NEURON
Topic: Reading species concentration in a MOD file using a list of species
Replies: 1
Views: 82

Re: Reading species concentration in a MOD file using a list of species

Unfortunately, the []s will cause problems for trying to read/write them from mod files.

specs0, specs1, ... specs19 would work for names (and then you could have e.g. specs0i, ispecs0, etc)
by ramcdougal
Thu Aug 25, 2022 3:08 am
Forum: NEURON + Python
Topic: Accessing Pointers instantiated through Python
Replies: 6
Views: 531

Re: Accessing Pointers instantiated through Python

setpointer literally sets a double* that's allocated inside of the MOD file. Once the assignment has been made, there is no explicit semantic information obtainable from the pointer. That is, h.setpointer(secA(0.5)._ref_v, 'V_pre', synAB) is 100% equivalent to: synAB._ref_V_pre = secA(0.5)._ref_v Bo...
by ramcdougal
Wed Aug 17, 2022 6:55 pm
Forum: Getting started
Topic: Installation of neuron, python compatibility
Replies: 1
Views: 679

Re: Installation of neuron, python compatibility

The binaries for NEURON 7.7 would not work with Python 3.8, which did not exist at the time 7.7 was released. I imagine it would work if it was compiled specifically for 3.8, but I would strongly suggest using a more recent version of NEURON. My guess is that it's saying there's a folder called &quo...
by ramcdougal
Fri Jul 29, 2022 2:46 pm
Forum: Other questions
Topic: h.finitialize() fails with a hocobj call error
Replies: 5
Views: 408

Re: h.finitialize() fails with a hocobj call error

Here's a possible clue... it's looking for a .so file. Usually on Windows, the equivalent is a .dll Are you using the regular Windows version of NEURON or a version the windows subsystem for linux (WSL)? Either way, if you try running with python -i myprogram.py (that is, add the -i flag so it doesn...
by ramcdougal
Tue Jun 14, 2022 2:56 pm
Forum: Reaction-diffusion in NEURON
Topic: Detection of MOD files in rxd.Region 'o'
Replies: 3
Views: 534

Re: Detection of MOD files in rxd.Region 'o'

Try putting the Shell next to the dendrite... i.e. you want lo = 1

Code: Select all

fh = rxd.Region(h.allsec(), nrn_region='o', geometry=rxd.Shell(lo=1.0, hi=2.0))
The numbers here are in fractions of a radius not µm.
by ramcdougal
Mon Jun 13, 2022 4:03 pm
Forum: Reaction-diffusion in NEURON
Topic: Detection of MOD files in rxd.Region 'o'
Replies: 3
Views: 534

Re: Detection of MOD files in rxd.Region 'o'

We'll look into this. What you describe sounds like it should have worked.
by ramcdougal
Mon Jun 13, 2022 3:56 pm
Forum: NEURON + Python
Topic: Minor typo in tutorial
Replies: 1
Views: 203

Re: Minor typo in tutorial

Fixed. Thanks.

For what it's worth, the tutorials at https://nrn.readthedocs.io are generally more up-to-date than the ones on the NEURON yale site (but we haven't moved all of them over yet).
by ramcdougal
Thu Apr 14, 2022 1:09 pm
Forum: NetPyNE
Topic: Save rxd concentration
Replies: 3
Views: 446

Re: Save rxd concentration

If you're using NEURON 8.1+, the pure-NEURON solution is to either use h.SaveState (which saves ~everything) or rxd.save_state() and rxd.restore_state(), where the rxd-specific solutions represent state using byte-strings. See the (admittedly brief) discussion at https://nrn.readthedocs.io/en/latest...
by ramcdougal
Sat Apr 02, 2022 5:35 pm
Forum: Reaction-diffusion in NEURON
Topic: Assignments in time and time-dependent functions
Replies: 2
Views: 372

Re: Assignments in time and time-dependent functions

Unfortunately rxd doesn't directly support expressions that depend on time.

Algebraic expressions should just work. (There's an example of this in the documentation linked below.)

For math functions, you'll want to use rxdmath see the rxdmath discussion in the documentation
by ramcdougal
Sat Apr 02, 2022 5:23 pm
Forum: NEURON + Python
Topic: Uploading .swc file through .hoc
Replies: 3
Views: 426

Re: Uploading .swc file through .hoc

Roughly speaking the HOC code would look exactly like the Python, but drop the h. part. That said, HOC and Python are just two different interfaces to the same simulator. You can mix and match. e.g. from Python, you can run a HOC script called my_script.hoc via: h.load_file("my_script.hoc"...
by ramcdougal
Fri Mar 25, 2022 11:07 am
Forum: NetPyNE
Topic: After updating to MacOS 12.3 Monterey
Replies: 5
Views: 455

Re: After updating to MacOS 12.3 Monterey

This looks like an install from the PKG installer?

In particular, you'll find you have a NEURON folder in Applications. Remove that, and then enter the following into the terminal:

Code: Select all

pip3 install neuron
by ramcdougal
Mon Mar 07, 2022 11:40 am
Forum: Reaction-diffusion in NEURON
Topic: Using setpointer() and RXD concentrations
Replies: 3
Views: 1878

Re: Using setpointer() and RXD concentrations

Glu.nodes is a list of all Glu nodes. If there is only one, then it is unambiguously safe to use Glu.nodes[0] . Otherwise, you'll want to filter down to a specific node by specifying e.g. segment, possibly region if there are multiple by using () for the filtering... So something like Glu.nodes(som...
by ramcdougal
Tue Nov 16, 2021 6:42 pm
Forum: NetPyNE
Topic: elaborate visualization of neuron morphologies and synapses
Replies: 8
Views: 1120

Re: elaborate visualization of neuron morphologies and synapses

I don't understand the distinction that you're making. Synapses are at some specific location, and using the mark method of a matplotlib/plotly h.PlotShape (or the point_mark method of a h.Shape), you can put points at specific locations in whatever style... e.g. with a matplotlib PlotShape, you can...
by ramcdougal
Tue Nov 16, 2021 2:18 pm
Forum: NetPyNE
Topic: elaborate visualization of neuron morphologies and synapses
Replies: 8
Views: 1120

Re: elaborate visualization of neuron morphologies and synapses

Why not something like:

Code: Select all

ps = h.PlotShape(False)
ps.plot(pyplot).mark(h.soma[0](0.5)).mark(h.apical_dendrite[68](1))
plt.show()
You can pass regular matplotlib arguments to mark to specify color, marker type, etc.