Search found 246 matches

by ramcdougal
Mon Mar 20, 2023 6:21 pm
Forum: Adding new mechanisms and functions to NEURON
Topic: Current NMODL Best Practices
Replies: 3
Views: 37

Re: Current NMODL Best Practices

Another way of putting it: the description specified in nmodl400.pdf is still pretty accurate. The text you found refers to something very specific to xtra.mod... most models will still use BREAKPOINT instead. See hh.mod for how NEURON implemented Hodgkin-Huxley itself. A few suggestions for modern ...
by ramcdougal
Mon Dec 05, 2022 2:07 pm
Forum: Parallel NEURON
Topic: Parallel NEURON on HPC help
Replies: 1
Views: 260

Re: Parallel NEURON on HPC help

Sounds like NEURON might have been built without dynamic MPI, in which case it'll try to use whichever version of MPI was picked at compile time. Before we try debugging the compilation instructions for 7.6, have you tested to see if the current release (8.2.1) binary works? Even if you want the old...
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: 442

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

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

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

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

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

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

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

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

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

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

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

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

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...