Simple Cell Tuning with bmtool¶
This tutorial demonstrates how to perform parameter tuning on a simple cell model using bmtool's single cell analysis tools. We'll cover:
- Setup and Compilation: Importing libraries and compiling NEURON mechanisms
- Cell Model Definition: Creating a Python class-based cell model
- Parameter Modification: Changing cell parameters on-the-fly
- Simulation Re-running: Resetting and re-executing simulations efficiently
- Automated Tuning: Iteratively optimizing parameters to achieve target behavior
Part 1: Setup and Compilation¶
First, we import the necessary libraries and compile the NEURON MOD files. This section sets up the environment for single cell analysis.
import os
import glob
import logging
import numpy as np
import matplotlib.pyplot as plt
from neuron import h
from bmtool.singlecell import (CurrentClamp,Profiler, run_and_plot)
%matplotlib inline
# Disable warnings for cleaner output
logging.disable(logging.WARNING)
Warning: no DISPLAY environment variable. --No graphics will be displayed.
# if already compiled then lets delete the folder and force a recompile
if os.path.isdir('modfiles/x86_64'):
os.system("rm -rf modfiles/x86_64")
if os.path.isdir('modfiles/arm64'):
os.system("rm -rf modfiles/arm64")
# compile the mod files
if not os.path.isdir("modfiles/x86_64"):
os.chdir('modfiles')
os.system("nrnivmodl")
os.chdir("..")
/Users/gregglickert/miniconda3/envs/bmtk/bin/nrnivmodl:10: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html from pkg_resources import working_set
/usr/bin/xcrun /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles Mod files: "./AMPA_NMDA_STP.mod" "./CaDynamics.mod" "./Ca_HVA.mod" "./Ca_LVA.mod" "./GABA_A_STP.mod" "./Gfluct.mod" "./Ih.mod" "./Im.mod" "./Im_v2.mod" "./K_P.mod" "./K_T.mod" "./Kd.mod" "./Kv2like.mod" "./Kv3_1.mod" "./NaTa.mod" "./NaTs.mod" "./NaV.mod" "./Nap.mod" "./SK.mod" "./cadad.mod" "./cal2.mod" "./can_mig.mod" "./exp2syn_stp.mod" "./gap.mod" "./h_kole.mod" "./imCA3.mod" "./k.mod" "./kBK.mod" "./kap_BS.mod" "./kdmc_BS.mod" "./kdrCA3.mod" "./kdr_BS.mod" "./kdrinter.mod" "./leak.mod" "./na.mod" "./nainter.mod" "./napCA3.mod" "./natCA3.mod" "./nax_BS.mod" "./vecevent_coreneuron.mod" Creating 'arm64' directory for .o files. -> NMODL ../Ca_HVA.mod -> NMODL ../AMPA_NMDA_STP.mod -> Compiling mod_func.cpp -> NMODL ../CaDynamics.mod -> NMODL ../GABA_A_STP.mod -> NMODL ../Ca_LVA.mod -> NMODL ../Gfluct.mod -> NMODL ../Ih.mod -> NMODL ../Im.mod -> NMODL ../Im_v2.mod -> NMODL ../K_P.mod -> NMODL ../K_T.mod -> NMODL ../Kd.mod -> NMODL ../NaTa.mod -> NMODL ../Kv2like.mod -> NMODL ../Kv3_1.mod -> NMODL ../NaTs.mod -> NMODL ../NaV.mod -> NMODL ../Nap.mod -> NMODL ../SK.mod -> NMODL ../cadad.mod -> NMODL ../cal2.mod -> NMODL ../can_mig.mod -> NMODL ../exp2syn_stp.mod Warning: Default 2 of PARAMETER cao will be ignored and set by NEURON. Warning: Default 5e-05 of PARAMETER cai will be ignored and set by NEURON. Warning: Default 2 of PARAMETER cao will be ignored and set by NEURON. Warning: Default 5e-05 of PARAMETER cai will be ignored and set by NEURON. -> NMODL ../gap.mod -> NMODL ../h_kole.mod -> NMODL ../imCA3.mod -> NMODL ../k.mod Warning: Default 6.3 of PARAMETER celsius will be ignored and set by NEURON. -> NMODL ../kBK.mod -> NMODL ../kap_BS.mod -> NMODL ../kdmc_BS.mod -> NMODL ../kdrCA3.mod -> NMODL ../kdr_BS.mod -> NMODL ../kdrinter.mod -> NMODL ../leak.mod -> NMODL ../na.mod Warning: Default -80 of PARAMETER ek will be ignored and set by NEURON. Warning: Default 6.3 of PARAMETER celsius will be ignored and set by NEURON. -> NMODL ../nainter.mod -> NMODL ../napCA3.mod -> NMODL ../natCA3.mod -> NMODL ../nax_BS.mod Warning: Default 45 of PARAMETER ena will be ignored and set by NEURON. -> NMODL ../vecevent_coreneuron.mod -> Compiling AMPA_NMDA_STP.c -> Compiling CaDynamics.c -> Compiling Ca_HVA.c Notice: ARTIFICIAL_CELL is a synonym for POINT_PROCESS which hints that it only affects and is affected by discrete events. As such it is not located in a section and is not associated with an integrator -> Compiling Ca_LVA.c -> Compiling GABA_A_STP.c -> Compiling Gfluct.c -> Compiling Ih.c -> Compiling Im.c -> Compiling Im_v2.c -> Compiling K_P.c -> Compiling K_T.c -> Compiling Kd.c
Translating AMPA_NMDA_STP.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/AMPA_NMDA_STP.c
Translating Ca_HVA.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/Ca_HVA.c
Translating CaDynamics.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/CaDynamics.c
Thread Safe
Thread Safe
Thread Safe
Translating Ca_LVA.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/Ca_LVA.c
Translating Gfluct.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/Gfluct.c
Translating GABA_A_STP.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/GABA_A_STP.c
Thread Safe
Thread Safe
Notice: This mechanism cannot be used with CVODE
Thread Safe
Translating Ih.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/Ih.c
Translating Im.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/Im.c
Translating Im_v2.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/Im_v2.c
Thread Safe
Thread Safe
Thread Safe
Translating K_P.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/K_P.c
Translating K_T.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/K_T.c
Translating Kd.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/Kd.c
Thread Safe
Thread Safe
Thread Safe
Translating Kv2like.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/Kv2like.c
Translating Kv3_1.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/Kv3_1.c
Translating NaTa.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/NaTa.c
Thread Safe
Thread Safe
Thread Safe
Translating NaTs.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/NaTs.c
Translating NaV.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/NaV.c
Translating Nap.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/Nap.c
Thread Safe
Translating SK.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/SK.c
NEURON's CVode method ignores conservation
Notice: LINEAR is not thread safe.
Thread Safe
Thread Safe
Translating cal2.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/cal2.c
Translating can_mig.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/can_mig.c
Translating exp2syn_stp.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/exp2syn_stp.c
Translating cadad.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/cadad.c
Thread Safe
Thread Safe
Thread Safe
Thread Safe
Translating gap.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/gap.c
Translating h_kole.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/h_kole.c
Translating imCA3.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/imCA3.c
Thread Safe
Translating k.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/k.c
Thread Safe
Thread Safe
Thread Safe
Translating kBK.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/kBK.c
Translating kdmc_BS.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/kdmc_BS.c
Translating kap_BS.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/kap_BS.c
Translating kdrCA3.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/kdrCA3.c
Thread Safe
Thread Safe
Thread Safe
Thread Safe
Translating leak.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/leak.c
Translating kdrinter.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/kdrinter.c
Translating na.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/na.c
Translating kdr_BS.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/kdr_BS.c
Thread Safe
Thread Safe
Thread Safe
Thread Safe
Translating nainter.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/nainter.c
Translating napCA3.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/napCA3.c
Thread Safe
Translating nax_BS.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/nax_BS.c
Thread Safe
Translating natCA3.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/natCA3.c
Thread Safe
Thread Safe
Translating vecevent_coreneuron.mod into /Users/gregglickert/Documents/GitHub/bmtool/docs/examples/notebooks/single_cell/modfiles/arm64/vecevent_coreneuron.c
Thread Safe
Ca_HVA.cAMPA_NMDA_STP.c::4342::18CaDynamics.c:42:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype] 42 | exter
18n: dwarning: oa function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]u
ble *getarg();
| ^
42 | extern double 43 | *g/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.he :ext15eta:r17g:( )note: ;expanded from macro 'getarg'
| ^
r n /Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.hd:o15u15b:l17 | #def: note: expanded from macro 'getarg'
e15ine ge t*getarg();
| a ^r
| g hoc_#g/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17d: note: expanded from macro 'getarg'
15 | #define getarg eefinheo targc
g _| ge ^teatarg hoc_rg
ge
t a| r ^
g
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: /Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.hconflicting prototype is here:49:16 :49 | note: econflicting prototype is herex
t
ern do u49 | ext49 | belxerent*ern do gdeutargo(uibnbt)l;el
e *| ^ *g geett
aarrg/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h(gint()i;n
t:15: 17: note: expanded from macro 'getarg'
| ^) ;
15 | #define getarg ho
c_getarg
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg | ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h: 15:17h:o cnote: _getargexpanded from macro 'getarg'
15 | #d
e fine getarg hoc_getarg
| | ^ ^
AMPA_NMDA_STP.c:414:32: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
414 | if (_tsav > t){ extern char* hoc_object_name(); hoc_execerror(hoc_object_name(_pnt->ob), ":Event arrived out of order. Must call ParallelContext.set_maxstep AFTER assigning minimum NetCon.delay");}
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:46:14: note: conflicting prototype is here
46 | extern char* hoc_object_name(Object*);
| ^
Ca_LVA.c:43:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
43 | extern double *getarg();
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
49 | extern double* getarg(int);
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
1 warning generated.
1 warning generated.
1 warning generated.
2 warnings generated.
Gfluct.c:43:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
43 | extern double *getarg();
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
49 | extern double* getarg(int);
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
GABA_A_STP.c:42:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
42 | extern double *getarg();
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
49 | extern double* getarg(int);
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
GABA_A_STP.c:356:32: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
356 | if (_tsav > t){ extern char* hoc_object_name(); hoc_execerror(hoc_object_name(_pnt->ob), ":Event arrived out of order. Must call ParallelContext.set_maxstep AFTER assigning minimum NetCon.delay");}
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:46:14: note: conflicting prototype is here
46 | extern char* hoc_object_name(Object*);
| ^
Ih.c:43:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
Im.c:43:18: warning: 43a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype] | extern doubl
e *getarg();
43 | | ^
extern double *getarg();
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_ge/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.ht:a15r:g17
: | note: ^expanded from macro 'getarg'
15
| #define getarg hoc_getarg
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
49 | extern dou/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16b:le* getar note: conflicting prototype is here
49 | extern double* getarg(int)g;
| (int);
| ^
^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17:/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h :note: 15expanded from macro 'getarg':
17: note: expanded from macro 'getarg'
15 | #15d | e#fdienfei ngee tgaertga r gh o ch_ogce_tgaertga
r g|
^
| ^
1 warning generated.
2 warnings generated.
1 warning generated.
1 warning generated.
Im_v2.c:43:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
43 | extern double *getarg();
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
49 | extern double* getarg(int);
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
K_P.c:43:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
43 | extern double *getarg();
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
49 | extern double* getarg(int);
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
K_T.c:43:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
43 | extern double *getarg();
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
49 | extern double* getarg(int);
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
Kd.c:43:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
43 | extern double *getarg();
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
49 | extern double* getarg(int);
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
1 warning generated.
1 warning generated.
1 warning generated.
1 warning generated.
Kv3_1.c:43:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
43 | extern double *getarg();
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getargKv2like.c:43:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
| ^
43 | extern double *geta/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.hr:g49(:)16;:
note: | conflicting prototype is here ^
49 | extern double* getarg(/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.hi:n15t:)17;:
note: | expanded from macro 'getarg' ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | 15# | d#edfeifnien eg egteatragr g h ohco_cg_egteatragr
g
| ^|
^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
49 | extern double* getarg(int);
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
NaTs.c:43:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
43 | extern double *getarg();
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
49 | extern double* getarg(int);
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
NaTa.c:43:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
43 | extern double *getarg();
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
49 | extern double* getarg(int);
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
1 warning generated.
1 warning generated.
1 warning generated.
1 warning generated.
Nap.c:43:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
43 | extern double *getarg();
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
49 | extern double* getarg(int);
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
NaV.c:43:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
43 | extern double *getarg();
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
49 | extern double* getarg(int);
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
NaV.c:404:17: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
404 | extern double *_getelm();
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/nrniv_mf.h:26:16: note: conflicting prototype is here
26 | extern double* _getelm(int, int);
| ^
SK.c:43:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
43 | extern double *getarg();
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
49 | extern double* getarg(int);
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
cadad.c:42:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
42 | extern double *getarg();
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
49 | extern double* getarg(int);
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
1 warning generated.
1 warning generated.
1 warning generated.
cal2.c:43:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
43 | extern double *getarg();
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
49 | extern double* getarg(int);
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
can_mig.c:43:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
43 | extern double *getarg();
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
49 | extern double* getarg(int);
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
exp2syn_stp.c:42:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
42 | extern double *getarg();
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
49 | extern double* getarg(int);
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
exp2syn_stp.c:343:32: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
343 | if (_tsav > t){ extern char* hoc_object_name(); hoc_execerror(hoc_object_name(_pnt->ob), ":Event arrived out of order. Must call ParallelContext.set_maxstep AFTER assigning minimum NetCon.delay");}
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:46:14: note: conflicting prototype is here
46 | extern char* hoc_object_name(Object*);
| ^
2 warnings generated.
1 warning generated.
1 warning generated.
2 warnings generated.
h_kole.c:42:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
42 | exgap.ct:e41r:n18 :d owarning: ua function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]b
le *getarg() ;41
| extern do u| b ^l
e *getarg();
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #de/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.hf:i15n:e17 :g enote: texpanded from macro 'getarg'a
rg 15h | o#cd_egfeitnaer gg
e t| a ^r
g hoc_getarg
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
49 | 49e | xetxetrenr nd oduobulbel*e *g egteatragr(gi(nitn)t;)
;
| ^|
^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h15::1517::17 :note: expanded from macro 'getarg'note:
expanded from macro 'getarg'
15 | 15# | d#edfeifnien eg egteatragr g h ohco_cg_egteatragr
g
| ^|
^
-> Compiling Kv2like.c -> Compiling Kv3_1.c -> Compiling NaTa.c -> Compiling NaTs.c -> Compiling Nap.c -> Compiling NaV.c -> Compiling SK.c -> Compiling cadad.c -> Compiling cal2.c -> Compiling can_mig.c -> Compiling exp2syn_stp.c -> Compiling gap.c -> Compiling h_kole.c -> Compiling imCA3.c -> Compiling k.c -> Compiling kBK.c -> Compiling kap_BS.c
imCA3.c:43:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
43 | extern double *getarg();
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
49 | extern double* getarg(int);
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
k.c:43:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
43 | extern double *getarg();
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
49 | extern double* getarg(int);
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
1 warning generated.
1 warning generated.
1 warning generated.
1 warning generated.
kBK.c:43:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
43 | extern double *getarg();
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
49 | extern double* getarg(int);
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
kap_BS.c:43:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
43 | extern double *getarg();
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
49 | extern double* getarg(int);
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
kdmc_BS.c:43:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
43 | extern double *getarg();
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
49 | extern double* getarg(int);
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
kdrCA3.c:43:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
43 | extern double *getarg();
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
49 | extern double* getarg(int);
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
1 warning generated.
1 warning generated.
1 warning generated.
1 warning generated.
kdr_BS.c:43:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
43 | extern double *getarg();
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
49 | extern double* getarg(int);
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
kdrinter.c:43:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
43 | extern double *getarg();
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
49 | extern double* getarg(int);
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
leak.c:41:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
41 | extern double *getarg();
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
49 | extern double* getarg(int);
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
na.c:43:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
43 | extern double *getarg();
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
49 | extern double* getarg(int);
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
1 warning generated.
1 warning generated.
1 warning generated.
1 warning generated.
nainter.cnapCA3.c::43:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
43 | extern d44ouble *getarg();
:18| : ^
warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #def ine getarg h44o | c_getarg
| ^
extern double *ge/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.ht:a49r:g();
| ^
16: note: conflicting prototype is here
49 | extern double/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h*: 15g:e17t: argnote: (expanded from macro 'getarg'int)
;
| ^
15 | #define get/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.ha:r15g: 17: note: expanded from macro 'getarg'
15 | #define geta horg hocc_geta_rgge
t a| r ^g
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
49 | extern double* getarg(int);
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
natCA3.c:43:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
43 | extern double *getarg();
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
49 | extern double* getarg(int);
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
nax_BS.c:43:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
43 | extern double *getarg();
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
49 | extern double* getarg(int);
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
1 warning generated.
1 warning generated.
1 warning generated.
1 warning generated.
-> Compiling kdmc_BS.c -> Compiling kdrCA3.c -> Compiling kdr_BS.c -> Compiling kdrinter.c -> Compiling leak.c -> Compiling na.c -> Compiling nainter.c -> Compiling napCA3.c -> Compiling natCA3.c -> Compiling nax_BS.c -> Compiling vecevent_coreneuron.c => LINKING shared library ./libnrnmech.dylib
vecevent_coreneuron.c:43:18: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
43 | extern double *getarg();
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:49:16: note: conflicting prototype is here
49 | extern double* getarg(int);
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/hocdec.h:15:17: note: expanded from macro 'getarg'
15 | #define getarg hoc_getarg
| ^
vecevent_coreneuron.c:242:32: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C23, conflicting with a previous declaration [-Wdeprecated-non-prototype]
242 | if (_tsav > t){ extern char* hoc_object_name(); hoc_execerror(hoc_object_name(_pnt->ob), ":Event arrived out of order. Must call ParallelContext.set_maxstep AFTER assigning minimum NetCon.delay");}
| ^
/Users/gregglickert/miniconda3/envs/bmtk/lib/python3.11/site-packages/neuron/.data/include/oc_ansi.h:46:14: note: conflicting prototype is here
46 | extern char* hoc_object_name(Object*);
| ^
2 warnings generated.
=> LINKING executable ./special LDFLAGS are:
Successfully created arm64/special
ld: warning: ignoring duplicate libraries: '-lnrnmech'
profiler = Profiler(template_dir='.', mechanism_dir='modfiles', dt=0.05)
Part 2: Creating the Profiler¶
The Profiler manages the NEURON environment and handles cell loading. We'll use it to work with our custom Python cell class.
h.load_file("stdrun.hoc")
class SimpleSoma(object):
"""Single-section cell: A soma with leak, sodium, and potassium channels."""
def __init__(self):
self.create_sections()
self.build_topology()
self.build_subsets()
self.define_geometry()
self.define_biophysics()
#
def create_sections(self):
"""Create the sections of the cell."""
# NOTE: cell=self is required to tell NEURON of this object.
self.soma = h.Section(name='soma', cell=self)
#
def build_topology(self):
"""Connect the sections of the cell to build a tree."""
# Single section - no connections needed
pass
#
def define_geometry(self):
"""Set the 3D geometry of the cell."""
self.soma.L = 500 # soma length um
self.soma.diam = 500 # soma diameter um
h.define_shape() # Translate into 3D points.
#
def define_biophysics(self):
"""Assign the membrane properties across the cell."""
for sec in self.all: # 'all' defined in build_subsets
sec.cm = 1 # membrane capacitance uF/cm2
sec.Ra = 30 # ohm-cm
# Insert leak channel
self.soma.insert('leak') # Leak channel
self.soma.glbar_leak = 0.0003 # S/cm2
self.soma.el_leak = -60 # mV
# Insert sodium channel
self.soma.insert('na') # Sodium channel
self.soma.gnabar_na = 0.12 # S/cm2
self.soma.nao = 79.8 # extracellular Na concentration
# Insert potassium channel
self.soma.insert('k') # Potassium channel
self.soma.gkbar_k = 0.036 # S/cm2
self.soma.ki = 69.35 # intracellular K concentration
#
def build_subsets(self):
"""Build subset lists. For now we define 'all'."""
self.all = h.SectionList()
self.all.wholetree(sec=self.soma)
cell = SimpleSoma()
Part 3: Defining a Python Class Cell Model¶
Here we define a simple soma cell model as a Python class. This approach allows us to easily modify parameters and re-run simulations without rebuilding the entire cell structure.
analysis_settings = {
'CurrentClamp': {
'celsius': 34.0,
'kwargs': {
'inj_amp': 100,
'inj_delay': 1500.0,
'inj_dur': 1000.0,
'tstop': 3000.0,
'threshold': -15.0
}
},
}
Part 4: Running the First Simulation¶
We run the current clamp simulation with the initial parameters and visualize the membrane potential response.
proc_settings = analysis_settings['CurrentClamp']
h.celsius = proc_settings['celsius']
# Create ReusableCurrentClamp instance
sim_cc = CurrentClamp(cell, **proc_settings['kwargs'])
# First run
t1, v1 = sim_cc.run()
plt.figure(figsize=(10, 5))
plt.plot(t1, v1)
plt.xlabel('Time (ms)')
plt.ylabel('Membrane Potential (mV)')
plt.title('Current Clamp Response')
plt.tight_layout()
plt.show()
Injection location: <__main__.SimpleSoma object at 0x318013b90>.soma(0.5) Recording: <__main__.SimpleSoma object at 0x318013b90>.soma(0.5)._ref_v Current clamp simulation running... Number of spikes: 0
Part 5: Modifying Cell Parameters¶
Since our cell is a Python class, we can directly modify its parameters. Here we increase the sodium conductance to see how it affects spiking behavior.
# Modify cell parameter
cell.soma.gnabar_na = 0.22 # S/cm2
# Reset NEURON state and re-run with modified parameter (no cell rebuild!)
sim_cc.reset_state()
t2, v2 = sim_cc.run()
plt.figure(figsize=(10, 5))
plt.plot(t2, v2)
plt.xlabel('Time (ms)')
plt.ylabel('Membrane Potential (mV)')
plt.title('Current Clamp Response')
plt.tight_layout()
plt.show()
Current clamp simulation running... Number of spikes: 179
Part 6: Automated Parameter Tuning¶
Finally, we demonstrate automated tuning: iteratively adjusting the sodium conductance until the cell produces the desired number of spikes. This shows how Python class-based models enable efficient parameter optimization. This simple example could be expanded and you could tune other parameters such as passive properties and FI curves.
# Automatically adjust gnabar_na to achieve target number of spikes
target_spikes = 5 # Set desired number of spikes
gnabar_na_start = 0.12 # Starting value
gnabar_na_step = 0.01 # Increment step
max_iterations = 100 # Safety limit
gnabar_na = gnabar_na_start
iteration = 0
# Clear any previous spike detections
sim_cc.nspks = 0
while sim_cc.nspks < target_spikes and iteration < max_iterations:
cell.soma.gnabar_na = gnabar_na
sim_cc.reset_state()
t, v = sim_cc.run()
current_spikes = sim_cc.nspks
print(f"Iteration {iteration}: gnabar_na = {gnabar_na:.3f}, spikes = {current_spikes}")
if current_spikes >= target_spikes:
break
gnabar_na += gnabar_na_step
iteration += 1
if iteration >= max_iterations:
print("Warning: Maximum iterations reached without achieving target spikes")
else:
print(f"Target achieved with gnabar_na = {gnabar_na:.3f}")
# Plot the final result
plt.figure(figsize=(10, 5))
plt.plot(t, v)
plt.xlabel('Time (ms)')
plt.ylabel('Membrane Potential (mV)')
plt.title(f'Current Clamp Response (gnabar_na = {gnabar_na:.3f}, spikes = {sim_cc.nspks})')
plt.tight_layout()
plt.show()
Current clamp simulation running... Number of spikes: 0 Iteration 0: gnabar_na = 0.120, spikes = 0 Current clamp simulation running... Number of spikes: 0 Iteration 1: gnabar_na = 0.130, spikes = 0 Current clamp simulation running... Number of spikes: 0 Iteration 2: gnabar_na = 0.140, spikes = 0 Current clamp simulation running... Number of spikes: 0 Iteration 3: gnabar_na = 0.150, spikes = 0 Current clamp simulation running... Number of spikes: 0 Iteration 4: gnabar_na = 0.160, spikes = 0 Current clamp simulation running... Number of spikes: 0 Iteration 5: gnabar_na = 0.170, spikes = 0 Current clamp simulation running... Number of spikes: 172 Iteration 6: gnabar_na = 0.180, spikes = 172 Target achieved with gnabar_na = 0.180