Open cristi-zz opened 5 years ago
Hi, this probably comes down to the NEURON version. For some reason, unknown to me, the cells from the HBP database does not appear to be working for us with version 7.6, while working just fine on 7.5, see similar problem in: https://github.com/alejoe91/MEArec/issues/6
Sadly, I do not at the moment know why this problem occurs, or how to deal with it, except switching to NEURON 7.5
UPDATE Ok, I installed neuron 7.5 from conda-forge. I re-installed LFPy, removed and re-compiled the .mod files, and now I got some activity. (eg. processor is working). Unfortunately there still is an error:
NEURON -- VERSION 7.5 master (6b4c19f) 2017-09-25
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2016
See http://neuron.yale.edu/neuron/credits
LFPy imported
neuron imported
Simulating L5_BP_bAC217_1
loading membrane mechanisms from ../mods/x86_64/.libs/libnrnmech.so
Additional mechanisms from files
CaDynamics_E2.mod Ca_HVA.mod Ca_LVAst.mod Ca.mod Ih.mod Im.mod K_Pst.mod K_Tst.mod Nap_Et2.mod NaTa_t.mod NaTs2_t.mod ProbAMPANMDA_EMS.mod ProbGABAAB_EMS.mod SK_E2.mod SKv3_1.mod
template bAC217_L5_BP_d0cc8d7615 found!
template bAC217_L5_BP_d0cc8d7615 found!
template bAC217_L5_BP_d0cc8d7615 found!
template bAC217_L5_BP_d0cc8d7615 found!
Loading constants
Setting temperature to 34.000000 C
Setting simulation time step to 0.025000 ms
...done.
loading morpho...
done.
Loading template...
1
1
1
done.
Initialize cell...
template bAC217_L5_BP_d0cc8d7615 exist already
...done.
Input weight: 0.23 - Num Spikes: 21
ROTATION type: physrot
Simulating L5_BP_bAC217_1
Mechanisms already loaded from path: ../mods. Aborting.
template bAC217_L5_BP_d0cc8d7615 found!
template bAC217_L5_BP_d0cc8d7615 found!
template bAC217_L5_BP_d0cc8d7615 found!
template bAC217_L5_BP_d0cc8d7615 found!
Loading constants
...done.
Initialize cell...
template bAC217_L5_BP_d0cc8d7615 exist already
...done.
Cell L5_BP_bAC217_1 extracellular spikes to be simulated
Traceback (most recent call last):
File "hbp_cells.py", line 782, in <module>
calc_extracellular(cell_folder, model, extra_sim_folder, vm_im_sim_folder, rotation, int(numb), probe, nobs)
File "hbp_cells.py", line 441, in calc_extracellular
for i in xrange(N.shape[0]):
NameError: name 'xrange' is not defined
Hm, I will let the script finish, and then focus on this xrange. I guess it is another leftover from python 2.7
OK, I would appreciate it very much if you let us know if this solves the problem.
Hi! The script ran without errors, afaik. Of course, I replaced the xrange
with range
.
There is still an warning, I don't know if it is relevant or not: UserWarning: Membrane currents do not sum to zero
This is the output of 13th cell type or so:
NEURON -- VERSION 7.5 master (6b4c19f) 2017-09-25
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2016
See http://neuron.yale.edu/neuron/credits
LFPy imported
neuron imported
Simulating L5_TTPC1_cADpyr232_1
loading membrane mechanisms from ../mods/x86_64/.libs/libnrnmech.so
Additional mechanisms from files
CaDynamics_E2.mod Ca_HVA.mod Ca_LVAst.mod Ca.mod Ih.mod Im.mod K_Pst.mod K_Tst.mod Nap_Et2.mod NaTa_t.mod NaTs2_t.mod ProbAMPANMDA_EMS.mod ProbGABAAB_EMS.mod SK_E2.mod SKv3_1.mod
template cADpyr232_L5_TTPC1_0fb1ca4724 found!
template cADpyr232_L5_TTPC1_0fb1ca4724 found!
template cADpyr232_L5_TTPC1_0fb1ca4724 found!
template cADpyr232_L5_TTPC1_0fb1ca4724 found!
Loading constants
Setting temperature to 34.000000 C
Setting simulation time step to 0.025000 ms
...done.
loading morpho...
done.
Loading template...
1
1
1
done.
Initialize cell...
template cADpyr232_L5_TTPC1_0fb1ca4724 exist already
...done.
Input weight: 0.23 - Num Spikes: 3
Input weight: 0.28750000000000003 - Num Spikes: 6
Input weight: 0.35937500000000006 - Num Spikes: 7
Input weight: 0.44921875000000006 - Num Spikes: 9
Input weight: 0.5615234375000001 - Num Spikes: 10
Input weight: 0.7019042968750001 - Num Spikes: 12
ROTATION type: physrot
Simulating L5_TTPC1_cADpyr232_1
Mechanisms already loaded from path: ../mods. Aborting.
template cADpyr232_L5_TTPC1_0fb1ca4724 found!
template cADpyr232_L5_TTPC1_0fb1ca4724 found!
template cADpyr232_L5_TTPC1_0fb1ca4724 found!
template cADpyr232_L5_TTPC1_0fb1ca4724 found!
Loading constants
...done.
Initialize cell...
template cADpyr232_L5_TTPC1_0fb1ca4724 exist already
...done.
Cell L5_TTPC1_cADpyr232_1 extracellular spikes to be simulated
/home/cristi/miniconda3/envs/neurocnn/lib/python3.6/site-packages/LFPy-2.0.0-py3.6-linux-x86_64.egg/LFPy/recextelectrode.py:317: UserWarning: Membrane currents do not sum to zero
warnings.warn('Membrane currents do not sum to zero')
Cell: L5_TTPC1_cADpyr232_1 Progress: [1/10]
Cell: L5_TTPC1_cADpyr232_1 Progress: [2/10]
Cell: L5_TTPC1_cADpyr232_1 Progress: [3/10]
Cell: L5_TTPC1_cADpyr232_1 Progress: [4/10]
Cell: L5_TTPC1_cADpyr232_1 Progress: [5/10]
Cell: L5_TTPC1_cADpyr232_1 Progress: [6/10]
Cell: L5_TTPC1_cADpyr232_1 Progress: [7/10]
Cell: L5_TTPC1_cADpyr232_1 Progress: [8/10]
Cell: L5_TTPC1_cADpyr232_1 Progress: [9/10]
Cell: L5_TTPC1_cADpyr232_1 Progress: [10/10]
@torbjone thank you for looking into this! If the above output looks ok, imho, you can close this issue (unil NEURON 7.7 will be deployed to conda-forge and a new pull request is made here, fixing the python 2 leftovers.)
Thank you again!
Hi @cristi-zz! The output looks good. Thanks @torbjone for sorting this out
It is possible that this problem may be related to https://github.com/neuronsimulator/nrn/issues/130 which is fixed by changeset https://github.com/neuronsimulator/nrn/commit/f837b5cf79708723b32da2a2d0cd5efffbca137c
Hi!
I cloned the library, created neurocnn env, (using conda and environment3.yml, and I got python 3.6.6),
installed NEURON with some trouble (
neuron.__version__
is7.6.2-3-g9f36b13
) installed and compiled LFPy ranpython hbp_cells.py compile
and it ended withSuccessfully created x86_64/special
and then, tried to rundo_all_cell_simulations
:python do_all_cell_simulations.py -probe Neuronexus-32-Kampff -n 10
I got the following errors: (13 times):
The offending code:
(1) Is file() something that had to be imported from somewhere?
I replaced it with open() [added
file=open
at the beginning of thehbp_cells.py
] assuming that the intention was to read the text contents of the .hoc files.Then, I got the following error: