Mechanisms ignored when attempting to initialize events

When Python is the interpreter, what is a good
design for the interface to the basic NEURON
concepts.

Moderator: hines

Post Reply
pacificmadrone
Posts: 2
Joined: Wed May 11, 2022 11:33 pm

Mechanisms ignored when attempting to initialize events

Post by pacificmadrone »

Hello. I've recently resumed using NEURON for the first time in about 5 years. I have not previously used it in conjunction with python, so please excuse my naivety. I am attempting to run the L5PC simulation published by Beniaguev et al. (Neuron, 2021) and provided online here: https://github.com/SelfishGene/neuron_a ... simulation

I believe I have set up everything correctly (and modified simulate_L5PC_and_create_dataset.py as needed). My problem is that the initialization of NetCon events via

Code: Select all

fih = h.FInitializeHandler(AddAllSynapticEvents)
does not seem to do anything. AddAllSynapticEvents is a simple function (nested for loop) that initiates NetCon events at times and sections specified by predefined arrays. That is, the custom mechanisms that should add excitatory and inhibitory currents to the dendrites are completely ignored. On the other hand, if I use the exact same code with a built-in mechanism like ExpSyn (in place of the custom mechamisms), the events are added at the expected times and sections.

The problem seems to be specific to my local installation, since I can successfully run the simulation with the custom mechanisms in a Google Colab session (without changing the python script). I am currently running Monterey on a mac, python 3.7, and neuron 8.1.

I realize that this is not a problem that would be straightforward for someone else to solve, but I was hoping that someone might suggest some trouble-shooting strategies or known/related issues I might investigate further.

Thanks.
ted
Site Admin
Posts: 6022
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Mechanisms ignored when attempting to initialize events

Post by ted »

if I use the exact same code with a built-in mechanism like ExpSyn (in place of the custom mechamisms), the events are added at the expected times and sections
Sounds like you're launching stock NEURON, rather than the nrnivmodl-created executable executable that contains the compiled mechanisms. When trying to launch this model using the custom mechanisms on your own mac, i.e. NOT via Google Colab, do you get any error messages? How are you compiling the mod files? Where is the resulting x86_64 directory being created, and does it contain a file called special? If you navigate to the directory that contains the nrnivmodl-created x86_64 directory, then execute
nrngui
from the command line, what does NEURON print to the terminal?
pacificmadrone
Posts: 2
Joined: Wed May 11, 2022 11:33 pm

Re: Mechanisms ignored when attempting to initialize events

Post by pacificmadrone »

Thanks very much for your response. I'll do my best to answer your questions in order.

When I launch the model, I do not receive any error messages. I compile the mod files running "nrnivmodl mods" from the working directory, where "mods" is a subdirectory with all the mod files. In this case, the x86_64 directory ends up in the working directory, and it does contain a file called special. I've also tried moving all the mod files to the working directory and then running simply "nrnivmodl", but that doesn't change anything.

When I run nrngui from the command line, NEURON prints
Additional mechanisms from files
"mods/CaDynamics_E2.mod" "mods/Ca_HVA.mod" "mods/Ca_LVAst.mod" "mods/Ih.mod" "mods/Im.mod" "mods/K_Pst.mod" "mods/K_Tst.mod" "mods/NaTa_t.mod" "mods/NaTs2_t.mod" "mods/Nap_Et2.mod" "mods/ProbAMPANMDA2.mod" "mods/ProbAMPANMDA_3.mod" "mods/ProbAMPANMDA_EMS.mod" "mods/ProbGABAAB_EMS.mod" "mods/ProbUDFsyn2.mod" "mods/SK_E2.mod" "mods/SKv3_1.mod" "mods/epsp.mod"
I'm not sure if this info helps, but if I add a line of code

Code: Select all

 neuron.load_mechanisms("./") 
to the Python script after the line that loads the nrngui.hoc, I receive the error: "NEURON: The user defined name already exists: CaDynamics_E2" when I run the script.

Thanks again.
Post Reply