OSCR

NEURONpyxl: fast, flexible, Python-integrated simulation of biophysical neural networks with complex plastic synapses.

Code ↔ Paper

13 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

The 13 matches
  1. [1] § Methods › Computational approaches ↔ neuronpyxl/network.py, lines 41–154 · score 0.80 · Backward Euler, Crank Nicholson, relaxation, NEURONpyxl, interface, CVODE
  2. [2] § Results › Leaky integrator neuron model ↔ neuronpyxl/network.py, lines 41–154 · score 0.79 · absolute error tolerance, Backwards Euler, Crank Nicholson, variable timesteps, CVODE, simulation
  3. [3] § Results › Leaky integrator neuron model ↔ neuronpyxl/scripts.py, lines 136–263 · score 0.78 · absolute error tolerance, Backwards Euler, Crank Nicholson, variable timesteps, models, simulation
  4. [4] § Methods › Computational approaches ↔ neuronpyxl/scripts.py, lines 136–263 · score 0.67 · Backward Euler, Crank Nicholson, dt, Excel, variable, error
  5. [5] § Methods › Computational approaches ↔ neuronpyxl/reader.py, lines 60–165 · score 0.65 · reversal potential, Excel spreadsheet, ion pools, regulation, variables, model
  6. [6] § Methods › Computational approaches ↔ neuronpyxl/scripts.py, lines 41–99 · score 0.60 · run_sim, gen_mods, NEURON simulation, command, duration, excel
  7. [7] § Results › Noise implementation ↔ neuronpyxl/network.py, lines 657–706 · score 0.59 · driving force, synaptic weight, finitialize, intervals, noise, cell
  8. [8] § Results › Parameter search ↔ scripts/fig10.py, lines 27–83 · score 0.55 · B63 fast, B30 B63, terminated, KPP, B64, protraction
  9. [9] § Methods › Computational approaches ↔ neuronpyxl/reader.py, lines 60–165 · score 0.55 · ion channels, electrical synapses, chemical synapses, cs, cell, voltage
  10. [10] § Results › Parameter search ↔ data-gen/fig13_data-gen.py, lines 81–118 · score 0.53 · B63 fast, B30 B63, KPP, B64, protraction, retraction
  11. [11] § Results › Noise implementation ↔ neuronpyxl/network.py, lines 709–725 · score 0.52 · NetStims, noisy, noise, cell, simulations, NEURONpyxl
  12. [12] § Results › Simulating a central pattern generating circuit ↔ scripts/benchmark.py, lines 1–21 · score 0.52 · independent simulations, synaptic weight, NEURONpyxl, noisy, noise
  13. [13] § Results › Electrical synapses ↔ neuronpyxl/network.py, lines 459–486 · score 0.51 · gap junction, Electrical synapses, neurons

Paper

Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

Python · 1,082 lines · 41 KB · GPL-3.0 · 5 matches

  1. """
  2. This file is part of neuronpyxl.
  3. The Network class is the central class for neuronpyxl. It takes the
  4. simplified results from the ExcelReader and generates the entire network
  5. from that information, assuming that the correctly-named mod files are
  6. already compiled (see ModBuilder). It also has capabilities to run simulations
  7. and record the data directly from NEURON. These functions can be accessed
  8. either through cmd_util.py or by creating a Network object and running the
  9. simulations from another .py file.
  10. Copyright (C) 2026 Uri Dickman, Peter J. Thomas, Hillel J. Chiel, John H. Byrne,
  11. and Curtis L. Neveu.
  12. neuronpyxl is free software: you can redistribute it and/or modify
  13. it under the terms of the GNU General Public License as published by
  14. the Free Software Foundation, either version 3 of the License, or
  15. any later version.
  16. neuronpyxl is distributed in the hope that it will be useful,
  17. but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. GNU General Public License for more details.
  20. You should have received a copy of the GNU General Public License
  21. along with neuronpyxl. If not, see <https://www.gnu.org/licenses/>.
  22. """
  23. from neuron import h
  24. import numpy as np
  25. import pandas as pd
  26. import copy
  27. import os
  28. import time
  29. from scipy.interpolate import CubicSpline
  30. from .cell import Cell
  31. from .reader import ExcelReader
  32. from typing import Tuple
  33. class Network:
  34. def __init__(
  35. self,
  36. params_file : str,
  37. sim_name : str,
  38. noise : tuple,
  39. dt : float,
  40. integrator : int,
  41. atol : float,
  42. eq_time : float,
  43. simdur : float,
  44. seed : bool=False
  45. ):
  46. """Network is the main class in NEURONpyxl.
  47. It is used for interfacing with NEURON and loading the Excel files.
  48. It also handles simulation control and data saving.
  49. Args:
  50. params_file (str): Filepath of Excel file to read in.
  51. sim_name (str): sheet in the spreadsheet to run.
  52. noise (tuple): noise parameters tuple (frequency, weight, tau)
  53. dt (float): timestep. If not provided, will use variables timestep and CVODE.
  54. integrator (int): 1 -> Backwards Euler, 2 -> Crank-Nicholson if dt is constant.
  55. atol (float): absolute error tolerance
  56. eq_time (float): equilibration time
  57. simdur (float): simulation duration (ms)
  58. seed (bool): if True, uses deterministic seed (not working).
  59. """
  60. self.cwd = os.getcwd()
  61. h.load_file("stdrun.hoc") # Necessary for NEURON run procedures
  62. ############# Initialize Network Data Structures #############
  63. self.cells = {} # Dict[cell name -> Cell object] (see cell.py)
  64. # Electrical synapse dictionary
  65. # Dict[presynaptic cell name -> Dict[postsynaptic cell name -> PointProcess]]
  66. self.electrical_synapses = {}
  67. # Dict[synapse type -> Dict[presynaptic cell name ->
  68. # Dict[postsynaptic cell name ->
  69. # Dict["synapse" -> PointProcess, "netcon" -> NetCon]]]]
  70. self.chemical_synapses = {"fast": {}, "slow": {}}
  71. # This is not used, but a function exists to compute if necessary
  72. self.input_resistance = {} # Dict[name -> resistance]
  73. # Define noise parameters
  74. # Rate (Hz): firing frequency, defines Poisson interval
  75. # Scale (uS): synaptic weight
  76. # Tau (ms): time constant
  77. if noise is not None:
  78. self.noise = {"rate": noise[0], "scale": noise[1], "tau": noise[2]}
  79. else:
  80. self.noise = None
  81. # Noise connections for
  82. # Tuple of 2 dicts structured as:
  83. # Dict["netstim" -> PointProcess
  84. # "syn" -> PointProcess
  85. # "netcon" -> PointProcess]
  86. # First syn is excitatory, second is inhibitory
  87. self.noise_cons = {}
  88. self.seed = seed
  89. # There can be multiple iclamps at the same location.
  90. self.current_clamps = {} # Dict[cell name -> List[h.IClamp]]
  91. self.v0 = {} # Initial voltages
  92. # List of ion pools active in each cell
  93. self.pools_active = {} # Dict[cell name -> List[str]]
  94. # Create a 0 reference in case there are unused hoc pointers
  95. # We use the 0 reference so they can still be added without changing the value.
  96. # This is used in the ion pool mechanism.
  97. self.zero_ref = h.Vector(1)
  98. self.zero_ref.x[0] = 0 # Set the first element to zero
  99. # Prefix for each of the NEURONpyxl NMODL mechanisms:
  100. self.mech_prefix = "neuronpyxl_"
  101. ############ Simulation setup parameters #############
  102. self.dt = dt # Timestep
  103. self.integrator = integrator # 1: Backwards Euler, 2: Crank-Nicholson, 3: CVODE
  104. match self.integrator:
  105. case 1:
  106. self.secondorder = 0
  107. case 2:
  108. self.secondorder = 2
  109. case 3:
  110. self.secondorder = 2
  111. self.atol = atol
  112. self.interp = 0.005 # Interpolation timestep default
  113. self.eq_time = eq_time # Relaxation time before recording
  114. if noise is not None:
  115. self.noise_eq_time = 1000
  116. else:
  117. self.noise_eq_time = 0
  118. self.simdur = simdur # Total duration to record after relaxation
  119. self.temp = 6.3 # None of the mechanisms use this
  120. self.record_synaptic_currents = False
  121. self.sim_name = sim_name
  122. self.params_file = params_file
  123. # Set up recording dictionary -- populated during run step
  124. # Dict["t" -> time recording, cell name -> Cell recordings for cell in cells]
  125. self.recording = {}
  126. self.synaptic_currents_recording = {}
  127. self.ran_before = False
  128. ############ Build the network #############
  129. self.setup(params_file) # Load in all parameters to NEURON
  130. def add_cell(self, cell: Cell):
  131. """Function to add a cell to the network.
  132. Args:
  133. cell (Cell): a Cell object
  134. """
  135. self.cells[cell.name] = cell
  136. def print_cell_section(self, name: str, loc: float):
  137. """Given a cell name, prints all of the mechanisms and parameter \
  138. values in the provided cell name and location.
  139. Args:
  140. name (str): name of the cell to print
  141. loc (float): location at which to print
  142. """
  143. h.psection(self.cells[name].section(loc))
  144. ############ Define getters and setters for parameter values #############
  145. ############ within the network to interface with NMODL #############
  146. def get_mech_parameter(self, name: str, param: str) -> float:
  147. """Set the value of a parameter from an ion channel/pool mechanism
  148. Args:
  149. name (str): cell name
  150. param (str): parameter name (see spreadsheet)
  151. Returns:
  152. float: value of the parameter
  153. """
  154. return getattr(self.cells[name].section(0.5), param)
  155. def get_cs_parameter(self, pre: str, post: str, cstype: str, param: str) -> float:
  156. """Set the value of a parameter of a chemical synapse
  157. Args:
  158. pre (str): presynaptic cell name
  159. post (str): postsynaptic cell name
  160. cstype (str): chemical synapse type (either fast or slow)
  161. param (str): parameter name (see spreadsheet csg,cse,csfat)
  162. Returns:
  163. float: value of the parameter
  164. """
  165. return getattr(self.chemical_synapses[cstype][pre][post]["synapse"], param)
  166. def get_es_parameter(self, pre: str, post: str, param: str) -> float:
  167. """Set the value of a parameter of an electrical synapse
  168. Args:
  169. pre (str): presynaptic cell name
  170. post (str): postsynaptic cell name
  171. param (str): paramter name (see spreadsheet es)
  172. Returns:
  173. float: value of the parameter
  174. """
  175. return getattr(self.electrical_synapses[pre][post], param)
  176. def set_mech_parameter(self, name: str, param: str, val: float) -> None:
  177. """Set the value of a parameter from an ion channel/pool mechanism
  178. Args:
  179. name (str): cell name
  180. param (str): parameter name (see spreadsheet)
  181. val (float): new parameter value
  182. """
  183. setattr(self.cells[name].section(0.5), param, val)
  184. def set_cs_parameter(self, pre: str, post: str, cstype: str, param: str, val: float) -> None:
  185. """Set the value of a parameter of a chemical synapse
  186. Args:
  187. pre (str): presynaptic cell name
  188. post (str): postsynaptic cell name
  189. cstype (str): chemical synapse type (either fast or slow)
  190. param (str): parameter name (see spreadsheet csg,cse,csfat)
  191. val (float): new parameter value
  192. """
  193. setattr(self.chemical_synapses[cstype][pre][post]["synapse"], param, val)
  194. def set_es_parameter(self, pre: str, post: str, param: str, val:float) -> None:
  195. """Set the value of a parameter of an electrical synapse
  196. Args:
  197. pre (str): presynaptic cell name
  198. post (str): postsynaptic cell name
  199. param (str): paramter name (see spreadsheet es)
  200. val (float): new parameter value
  201. """
  202. setattr(self.electrical_synapses[pre][post], param, val)
  203. def setup(self, file):
  204. """Calls all of the initialization functions in order to build the network from
  205. the provided Excel file.
  206. Args:
  207. file (pd.ExcelFile): an Excel file read in by Pandas.
  208. """
  209. self.reader = ExcelReader(file, self.sim_name, 21)
  210. self.add_cells_from_reader()
  211. print("Loading simulation parameters...")
  212. self.feed_pools_from_reader()
  213. self.add_regulation_from_reader()
  214. self.add_synapses_from_reader()
  215. self.set_up_v0_from_reader()
  216. if self.noise is not None:
  217. self.add_noise()
  218. self.add_iclamps_from_reader()
  219. def add_cells_from_reader(self):
  220. """Adds all cells present in the model into the network, along with their
  221. corresponding mechanisms. Sets all parameter values of each mechanism in
  222. each cell according to those present in the spreadsheet.
  223. """
  224. cell_data = self.reader.cells_data
  225. mechs_data = (
  226. self.reader.mechs_data[self.reader.mechs_data.index != 0]
  227. .dropna(axis=0, how="all")
  228. )
  229. mechs = [
  230. m for m in mechs_data.columns.levels[0]
  231. if "Unnamed" not in m and "File" not in m
  232. ]
  233. self.all_mechs = []
  234. assert not mechs_data.empty and not cell_data.empty, \
  235. "You must run a simulation with at least one cell."
  236. for name, row in mechs_data.iterrows():
  237. vdg_parameters = {}
  238. cm = cell_data.loc[name]["cm"]
  239. for m in mechs:
  240. if m not in row:
  241. continue
  242. r = row[m]
  243. if r["vdg"].isna().to_numpy().all():
  244. continue
  245. key = m.lower().strip().replace("_", "")
  246. if key not in self.all_mechs:
  247. self.all_mechs.append(key)
  248. vdg_parameters[key] = {
  249. "g": r["vdg"]["g"],
  250. "e": r["vdg"]["E"],
  251. }
  252. if key == "leak":
  253. continue
  254. if "p" in r["vdg"].index:
  255. vdg_parameters[key]["p"] = r["vdg"]["p"]
  256. if not pd.isna(r["A"]).all():
  257. self._set_activation_parameters(vdg_parameters, key, r, "A")
  258. if not pd.isna(r["B"]).all():
  259. self._set_activation_parameters(vdg_parameters, key, r, "B")
  260. else:
  261. vdg_parameters[key]["numbtaus"] = 0
  262. else:
  263. vdg_parameters[key]["numataus"] = 0
  264. vdg_parameters[key]["numbtaus"] = 0
  265. mechs_with_prefix = [self.mech_prefix + m for m in vdg_parameters]
  266. c = Cell(name=name, current_mechs=mechs_with_prefix, cm=cm)
  267. for mech, d in vdg_parameters.items():
  268. for param, val in d.items():
  269. setattr(c.section(0.5), f"{param}_{self.mech_prefix}{mech}", val)
  270. self.add_cell(c)
  271. print(f"Added {c} to the network.")
  272. def _set_activation_parameters(self, vdg_parameters, key, r, var):
  273. """Helper function to set activation parameters of ion channel mechanisms.\
  274. A and B are identical sets of equations, so this function sets all parameter \
  275. values accounting for every possible variable combination that exists within \
  276. the SNNAP model.
  277. Args:
  278. vdg_parameters (dict): main parameter dictionary (see below)
  279. r (pd.Series): row of the df
  280. key (str): ion channel mechanism
  281. var (str): A or B
  282. """
  283. if pd.isna(r[var]["tmx"]):
  284. vdg_parameters[key][f"{var}infonly"] = 1
  285. for param, val in r[var].items():
  286. if not pd.isna(val):
  287. vdg_parameters[key][f"{param}{var}"] = val
  288. if not f"{var}infonly" in vdg_parameters[key]:
  289. if param == "tmx" and (r[var]["ts1"] == 0 or pd.isna(r[var]["ts1"])):
  290. vdg_parameters[key][f"tmx{var}only"] = 1
  291. vdg_parameters[key][f"num{var.lower()}taus"] = 1
  292. if not pd.isna(r[var]["ts1"]) and r[var]["ts1"] != 0:
  293. if pd.isna(r[var]["ts2"]) or r[var]["ts2"] == 0:
  294. vdg_parameters[key][f"num{var.lower()}taus"] = 1
  295. else:
  296. vdg_parameters[key][f"num{var.lower()}taus"] = 2
  297. def feed_pools_from_reader(self):
  298. """Sets up the ion pool feeding mechanism from Python according to the implementation in NMODL.
  299. If a channel feeds into a pool, then it has a STATE variable for that concentration
  300. contribution (e.g. cai_state). Then, the ion pool accumulator mechanism is added into the
  301. cell and reads in all the state variables which feed into the pool as pointers. The sum of
  302. those concentrations becomes the total concentration of the ion pool, which is set by the
  303. accumulator and not the channel mechanism.
  304. """
  305. possible_ions = ["ca", "na", "k", "cl"]
  306. max_channels = {}
  307. for m in self.all_mechs:
  308. for ion in possible_ions:
  309. if m.startswith(ion):
  310. max_channels.setdefault(ion, 0)
  311. max_channels[ion] += 1
  312. df = (
  313. self.reader.cond_to_ion_data
  314. [self.reader.cond_to_ion_data.index != 0]
  315. .dropna(axis=1, how="all")
  316. .dropna(axis=0, how="all")
  317. )
  318. if df.empty:
  319. return
  320. for name, row in df.iterrows():
  321. pools_data = self.reader.ion_pools_data.loc[name]
  322. pools_data = pools_data[pools_data.index != 0]
  323. pools = {}
  324. for ion_key, k1_key, k2_key in [
  325. ("ion", "K1", "K2"),
  326. ("ion_1", "K1_1", "K2_1"),
  327. ("ion_2", "K1_2", "K2_2"),
  328. ]:
  329. ion_value = pools_data[ion_key]
  330. if isinstance(ion_value, str):
  331. pool = ion_value.lower().strip()
  332. if pool not in pools:
  333. pools[pool] = {"k1": pools_data[k1_key], "k2": pools_data[k2_key]}
  334. cell : Cell = self.cells[name]
  335. ions = {}
  336. for i in range(4):
  337. ch_col = f"ch_{i}" if i > 0 else "ch"
  338. ion_col = f"ion_{i}" if i > 0 else "ion"
  339. if ch_col in df.columns and ion_col in df.columns:
  340. if isinstance(row[ch_col], str) and isinstance(row[ion_col], str):
  341. ch = row[ch_col].lower().strip()
  342. ion = row[ion_col].lower().strip()
  343. self.pools_active.setdefault(name, set()).add(ion)
  344. ions.setdefault(ion, []).append(ch)
  345. cell.load_mechanisms([f"{self.mech_prefix}{ion}pool" for ion in self.pools_active[name]])
  346. for ion, l in ions.items():
  347. for j, ch in enumerate(l):
  348. chmech = getattr(cell.section(0.5), f"{self.mech_prefix}{ion}pool")
  349. ref = getattr(cell.section(0.5), f"_ref_i_{self.mech_prefix}{ch}")
  350. h.setpointer(ref, f"i{j+1}", chmech)
  351. if j < max_channels[ion] - 1:
  352. for k in range(j + 1, max_channels[ion] - j):
  353. h.setpointer(
  354. self.zero_ref._ref_x[0],
  355. f"i{k+1}",
  356. getattr(cell.section(0.5), f"{self.mech_prefix}{ion}pool"),
  357. )
  358. setattr(cell.section(0.5), f"k1_{self.mech_prefix}{ion}pool", pools[ion]["k1"])
  359. setattr(cell.section(0.5), f"k2_{self.mech_prefix}{ion}pool", pools[ion]["k2"])
  360. def add_iclamps_from_reader(self):
  361. """Sets up current clamps to the network, if provided in the spreadsheet.
  362. """
  363. if self.reader.iclamp_data.empty:
  364. return
  365. for name, row in self.reader.iclamp_data.iterrows():
  366. self.attach_iclamp(name, delay=row["start"]*1000,
  367. dur=(row["stop"]-row["start"])*1000, amp=row["magnitude"]
  368. )
  369. def add_synapses_from_reader(self):
  370. """Function to add all of the synaptic connections to the network.
  371. Raises:
  372. ValueError: raised if a nonexistent ion is listed as facilitating.
  373. """
  374. #### Electrical synapses
  375. df_esg = self.reader.esg_data
  376. if not df_esg.empty:
  377. esg_stacked = df_esg[df_esg != 0].stack().dropna()
  378. for (pre, post), g in esg_stacked.items():
  379. presyn = self.cells[pre]
  380. postsyn = self.cells[post]
  381. syn = h.neuronpyxl_ES(postsyn.section(0.5))
  382. # Set max conductance
  383. syn.g = g
  384. # Set up presynaptic potential pointer (works the same as gap junction NEURON mechanism file)
  385. syn._ref_vpre = presyn.section(0.5)._ref_v
  386. # Update ES dictionary
  387. self.electrical_synapses.setdefault(pre, {})[post] = syn
  388. # Add chemical synapses to network
  389. df_csg = self.reader.csg
  390. df_cse = self.reader.cse
  391. df_cs_params_fast = self.reader.csfat_params_fast
  392. df_cs_params_slow = self.reader.csfat_params_slow
  393. self._add_cs(df_csg, df_cse, df_cs_params_fast, "fast")
  394. self._add_cs(df_csg, df_cse, df_cs_params_slow, "slow")
  395. def _set_attr_cs_params(self, d, syn):
  396. """Helper method to recursively set values of all
  397. params in below dictionaries
  398. Args:
  399. d (dict): dictionary
  400. syn (hoc object): synapse, a point process
  401. """
  402. for k, v in d.items():
  403. if isinstance(v, dict):
  404. self._set_attr_cs_params(v, syn)
  405. else:
  406. setattr(syn, k, v)
  407. def _add_cs(self, dfg, dfe, dfparams, type):
  408. """Add chemical synapses to a network
  409. Args:
  410. dfg (pd.DataFrame): df with synaptic conductances (csg in spreadsheet)
  411. dfe (pd.DataFrame): df with reversal potentials (esg in spreadsheet)
  412. dfparams (pd.DataFrame): df with parameters for CS mechanism (cs_fat in spreadsheet)
  413. type (str): either fast or slow
  414. Raises:
  415. ValueError: _description_
  416. """
  417. if any(len(df) == 0 for df in [dfg, dfe, dfparams]):
  418. return
  419. for pre, d in dfg[type].items():
  420. if pre == 0:
  421. continue
  422. for post, g in d.items():
  423. if post == 0:
  424. continue
  425. presyn = self.cells[pre]
  426. postsyn = self.cells[post]
  427. syn = h.neuronpyxl_CS(postsyn.section(0.5))
  428. params = {}
  429. for k, v in dfparams[pre][post].dropna().to_dict().items():
  430. params.setdefault(k[0], {})[k[1]] = v
  431. params["g"] = g
  432. params["e"] = dfe[type][pre][post]
  433. if len(params["taus"]) == 1:
  434. params["taus"]["u2"] = params["taus"]["u1"]
  435. params["taus"]["u1"] *= 1000
  436. params["taus"]["u2"] *= 1000
  437. if "Voltage dependence" in params:
  438. params["voltage_dependence"] = 1
  439. if "tx" not in params["Voltage dependence"] or params["Voltage dependence"]["tx"] == 0:
  440. params["tx"] = -1
  441. else:
  442. params["Voltage dependence"]["tx"] *= 1000
  443. if "depression" in params:
  444. params["depress"] = 1
  445. params["depression"]["ud"] *= 1000
  446. params["depression"]["ur"] *= 1000
  447. if "facilitation" in params:
  448. ion = params["facilitation"]["ion"].lower().strip()
  449. pre_sec = presyn.section(0.5)
  450. match ion:
  451. case "ca": syn._ref_mod = pre_sec._ref_cai
  452. case "na": syn._ref_mod = pre_sec._ref_nai
  453. case "k": syn._ref_mod = pre_sec._ref_ki
  454. case "cl": syn._ref_mod = pre_sec._ref_cli
  455. case _:
  456. raise ValueError(f"{ion} is not a valid facilitation ion. Must be one of Ca, Na, K, or Cl.")
  457. params["facilitation"]["u"] *= 1000
  458. params["facilitation"]["ion"] = 1
  459. self._set_attr_cs_params(params, syn)
  460. nc = h.NetCon(presyn.section(0.5)._ref_v, syn, sec=presyn.section)
  461. nc.threshold = 0.0
  462. nc.delay = 0.0
  463. nc.weight[0] = 0
  464. self.chemical_synapses[type].setdefault(pre, {})[post] = {"synapse": syn, "netcon": nc}
  465. def add_regulation_from_reader(self):
  466. """Function to set up ion regulation from an ion pool.
  467. Raises:
  468. ValueError: throws a value error if the ion regulator is not
  469. one of Ca, Na, K or Cl.
  470. """
  471. unitconv = {
  472. "p1": {1: 1000, 2: 1e-6, 3: 1, 4: 1e6, 5: 1e-6},
  473. "p2": 1000,
  474. }
  475. ions = ["ca", "na", "k", "cl"]
  476. df = (
  477. self.reader.ion_to_cond_data
  478. [self.reader.ion_to_cond_data.index != 0]
  479. .dropna(axis=1, how="all")
  480. .dropna(axis=0, how="all")
  481. )
  482. if df.empty:
  483. return
  484. for name, row in df.iterrows():
  485. cell = self.cells[name]
  486. for i in range(4):
  487. suffix = f"_{i}" if i > 0 else ""
  488. ch_col = f"ch{suffix}"
  489. ion_col = f"ion{suffix}"
  490. if ch_col not in df.columns or ion_col not in df.columns:
  491. continue
  492. ch = row[ch_col].lower().strip()
  493. ion = row[ion_col].lower().strip()
  494. opt1 = row[f"opt1{suffix}"]
  495. opt2 = row[f"opt2{suffix}"]
  496. p1 = row[f"p1{suffix}"]
  497. p2_col = f"p2{suffix}"
  498. b_col = f"b{suffix}"
  499. try:
  500. ion_num = ions.index(ion) + 1
  501. except ValueError:
  502. raise ValueError(f"{ion} is not a valid regulatory ion. Must be one of Ca, Na, K, or Cl.")
  503. sec = cell.section(0.5)
  504. setattr(sec, f"region_{self.mech_prefix}{ch}", ion_num)
  505. setattr(sec, f"opt1_{self.mech_prefix}{ch}", opt1)
  506. setattr(sec, f"opt2_{self.mech_prefix}{ch}", opt2)
  507. setattr(sec, f"p1_{self.mech_prefix}{ch}", p1 * unitconv["p1"][opt2])
  508. if p2_col in df.columns:
  509. setattr(sec, f"p2_{self.mech_prefix}{ch}", row[p2_col] * unitconv["p2"])
  510. if b_col in df.columns:
  511. setattr(sec, f"b_{self.mech_prefix}{ch}", row[b_col])
  512. def set_up_v0_from_reader(self):
  513. """Function to set all of the initial voltages of the cell membranes according to the spreadsheet.
  514. """
  515. df_v0 = self.reader.initial_voltage_data
  516. df_v0.dropna(axis=0, inplace=True)
  517. if df_v0.empty: # If voltages not provided, will default to -60 mV
  518. for c in self.cells.keys():
  519. self.v0[c] = -60.0
  520. else:
  521. self.v0 = df_v0[df_v0.index != 0].to_dict()["mV"]
  522. def compute_input_resistance(self):
  523. """
  524. Function to compute the imput resistance of each cell in the network.
  525. """
  526. for name, cell in self.cells.items():
  527. z = h.Impedance()
  528. z.loc(0.5, sec=cell.section) # Measure impedance at the center of the soma
  529. z.compute(0) # Compute impedance at frequency f=0 (DC)
  530. self.input_resistance[name] = z.input(0.5, sec=cell.section)
  531. def add_noise(self):
  532. """
  533. Function to add noise inthe form of 2 netstims with equal driving force.
  534. """
  535. e1 = 60
  536. e2 = -90
  537. rate = self.noise["rate"] / 1000 # 1 / ms
  538. def spike_num(rate, simdur):
  539. return rate*simdur
  540. h.finitialize()
  541. #h.continuerun(self.noise_eq_time)
  542. for name, cell in self.cells.items():
  543. e0 = cell.section(0.5).v
  544. num = spike_num(rate, self.simdur+self.noise_eq_time)
  545. ns1 = h.NetStim()
  546. ns1.number = num
  547. ns1.start = self.eq_time
  548. ns1.interval = 1 / rate
  549. ns1.noise = 1.0
  550. ns2 = h.NetStim()
  551. ns2.number = num
  552. ns2.start = self.eq_time
  553. ns2.interval = 1 / rate
  554. ns2.noise = 1.0
  555. syn1 = h.ExpSyn(cell.section(0.5))
  556. syn1.tau = self.noise["tau"]
  557. syn1.e = e1
  558. syn2 = h.ExpSyn(cell.section(0.5))
  559. syn2.tau = self.noise["tau"]
  560. syn2.e = e2
  561. # Connect the NetStim to the synapse via a NetCon
  562. nc1 = h.NetCon(ns1, syn1)
  563. nc1.weight[0] = np.abs((e2 - e0) / (e1 - e0)) * self.noise["scale"] # Synaptic weight in μS
  564. nc2 = h.NetCon(ns2, syn2)
  565. nc2.weight[0] = self.noise["scale"] # Synaptic weight in μS
  566. # Package the objects together and add it to the class object
  567. self.noise_cons[name] = (
  568. {"netstim": ns1, "syn": syn1, "netcon": nc1},
  569. {"netstim": ns2, "syn": syn2, "netcon": nc2}
  570. )
  571. self.set_seed()
  572. def set_seed(self):
  573. """
  574. Doesnt seem to be working yet.
  575. Intended functionality: deterministically set the seed number as a test for noisy simulations.
  576. """
  577. num_seeds = 2 * len(self.cells) # 2 seeds per NetStim, 2 NetStims per cell
  578. if self.seed:
  579. seeds = np.arange(1, num_seeds+1,dtype=int)
  580. else:
  581. seeds = np.random.choice(np.arange(1, 1000,dtype=int), size=num_seeds, replace=False)
  582. seeds = seeds.reshape(2, len(self.cells))
  583. for i, ((_, (d1, d2))) in enumerate(self.noise_cons.items()):
  584. seed1 = seeds[0, i]
  585. seed2 = seeds[1, i]
  586. d1["netstim"].seed(seed1)
  587. d2["netstim"].seed(seed2)
  588. def attach_iclamp(self, name: str, delay:float=None, dur:float=None, amp:float=None):
  589. """Add an iclamp to the network
  590. Args:
  591. name (str): name of cell to insert iclamp
  592. delay (float, optional): delay of start of current inejction (ms). Defaults to None.
  593. dur (float, optional): duration of current injection (ms). Defaults to None.
  594. amp (float, optional): amplitude of current injection (nA). Defaults to None.
  595. Returns:
  596. _type_: A hoc current clamp object
  597. """
  598. assert name in self.cells, f"Cell name '{name}' not found in cells dict"
  599. delaytime = delay+self.eq_time+self.noise_eq_time if delay is not None else None
  600. ic = self.cells[name].iclamp(delaytime, dur, amp, 0.5)
  601. self.current_clamps.setdefault(name, []).append(ic)
  602. return ic
  603. def remove_iclamp(self, name: str, index: int):
  604. """Remove an IClamp from the network
  605. Args:
  606. name (str): name of clamp to remove
  607. index (int): index in the list of clamp to remove (in order of time added)
  608. """
  609. assert name in self.current_clamps, \
  610. f"Cell '{name}' must be the name of a cell in the Network, and the IClamp must already exist"
  611. if name in self.recording:
  612. del self.recording[name]["iclamps"][index]
  613. del self.current_clamps[name][index]
  614. def record_voltage_only(self):
  615. """Record only the voltage traces of the cells in the network
  616. """
  617. self.voltage_only = True
  618. self.recording["t"] = h.Vector().record(h._ref_t)
  619. for name, cell in self.cells.items():
  620. cell.recording = {"V": h.Vector().record(cell.section(0.5)._ref_v)}
  621. self.recording[name] = cell.recording
  622. if name in self.current_clamps:
  623. self.recording[name]["iclamps"] = []
  624. for clamp in self.current_clamps[name]:
  625. self.recording[name]["iclamps"].append(h.Vector().record(clamp._ref_i))
  626. def record_all(self):
  627. """Records time, membrane potential, currents from all mechanisms, and ion pool
  628. concentrations if available. Also records injected voltage and current if available.
  629. """
  630. self.voltage_only = False
  631. self.recording["t"] = h.Vector().record(h._ref_t)
  632. for name, cell in self.cells.items():
  633. cell.set_iv_recording()
  634. if name in self.pools_active:
  635. sec = cell.section(0.5)
  636. for ion in self.pools_active[name]:
  637. cell.recording[f"{ion}i"] = h.Vector().record(getattr(sec, f"_ref_{ion}i"))
  638. if self.noise is not None:
  639. cell.recording["noise1"] = h.Vector().record(self.noise_cons[name][0]["syn"]._ref_i)
  640. cell.recording["noise2"] = h.Vector().record(self.noise_cons[name][1]["syn"]._ref_i)
  641. self.recording[name] = cell.recording
  642. if name in self.current_clamps:
  643. self.recording[name]["iclamps"] = [
  644. h.Vector().record(clamp._ref_i)
  645. for clamp in self.current_clamps[name]
  646. ]
  647. if self.record_synaptic_currents:
  648. if self.chemical_synapses:
  649. self.synaptic_currents_recording["chemical"] = {}
  650. if self.electrical_synapses:
  651. self.synaptic_currents_recording["electrical"] = {}
  652. for speed, d1 in self.chemical_synapses.items():
  653. for pre, d2 in d1.items():
  654. for post, d3 in d2.items():
  655. self.synaptic_currents_recording["chemical"].setdefault(speed,{})\
  656. [f"{pre}_2_{post}"] = \
  657. h.Vector().record(d3["synapse"]._ref_i
  658. )
  659. for pre, d in self.electrical_synapses.items():
  660. for post, syn in d.items():
  661. self.synaptic_currents_recording["electrical"][f"{pre}_2_{post}"] = \
  662. h.Vector().record(syn._ref_i)
  663. self.synaptic_currents_recording["t"] = h.Vector().record(h._ref_t)
  664. def record_other(self, name: str, ref: str):
  665. """Record a custom hoc pointer."""
  666. key = ref.replace("_ref_", "")
  667. self.recording.setdefault(name, {})[key] = h.Vector().record(
  668. getattr(self.cells[name].section(0.5), ref)
  669. )
  670. def record(self, voltage_only: bool):
  671. """Main function to record hoc pointers
  672. Args:
  673. voltage_only (bool): if passed in, only records the voltage
  674. """
  675. if voltage_only:
  676. self.record_voltage_only()
  677. else:
  678. self.record_all()
  679. def setup_run(self, record_none: bool = False, voltage_only: bool = False):
  680. for name, c in self.cells.items():
  681. for seg in c.section:
  682. seg.v = self.v0[name]
  683. if self.dt > 0:
  684. h.dt = self.dt
  685. if self.integrator == 3:
  686. h.cvode.active(True)
  687. h.cvode.atol(self.atol)
  688. h.cvode.maxstep(10)
  689. h.celsius = self.temp
  690. h.secondorder = self.secondorder
  691. if not record_none:
  692. self.record(voltage_only)
  693. def run(self, voltage_only: bool = False, record_none: bool = False):
  694. """Run the NEURON simulations --> record and call the correct solvers
  695. Prioritizes record_none first.
  696. Args:
  697. voltage_only (bool, optional): records only the voltage. Defaults to False.
  698. record_none (bool, optional): doesn't record anhything. Defaults to False.
  699. """
  700. self.setup_run(record_none=record_none, voltage_only=voltage_only)
  701. print("Running simulation...")
  702. start_time = time.time()
  703. h.finitialize()
  704. h.continuerun(self.eq_time + self.noise_eq_time + self.simdur)
  705. self.simtime = time.time() - start_time
  706. self.ran_before = True
  707. def get_synaptic_current_data(self) -> Tuple[dict]:
  708. """Returns current data from electrical and chemical synapses, if present.
  709. If one is not present, it is returned as None.
  710. Returns:
  711. Tuple[dict]: chemical synapse data, electrical synapse data
  712. """
  713. t = self.synaptic_currents_recording["t"].as_numpy() + self._adjust_t()
  714. if "chemical" in self.synaptic_currents_recording:
  715. chem_data = {"t": t}
  716. for speed, d in self.synaptic_currents_recording["chemical"].items():
  717. for k, v in d.items():
  718. chem_data[f"I_{k}_{speed}"] = v.as_numpy()
  719. else:
  720. chem_data = None
  721. if "electrical" in self.synaptic_currents_recording:
  722. elec_data = {"t": t}
  723. for k, v in self.synaptic_currents_recording["electrical"].items():
  724. elec_data[f"I_{k}"] = v.as_numpy()
  725. else:
  726. elec_data = None
  727. return copy.deepcopy(chem_data), copy.deepcopy(elec_data)
  728. def get_cell_data(self, name: str) -> dict:
  729. """Returns all data from a cell, including ion channel currents, applied current
  730. injections, membrane potential, and ion concentrations.
  731. Args:
  732. name (str): name of the cell whose data to return.
  733. Returns:
  734. dict: all of the cell's recorded data.
  735. """
  736. adjust_t = self._adjust_t()
  737. c = self.cells[name]
  738. cell_data = c.get_data()
  739. cell_data["t"] = self.recording["t"].as_numpy()
  740. indices = np.where(cell_data["t"] > (self.eq_time + self.noise_eq_time - adjust_t))[0]
  741. if self.noise is not None and not self.voltage_only:
  742. cell_data["noise"] = cell_data.pop("noise1") + cell_data.pop("noise2")
  743. for k, v in cell_data.items():
  744. if k[0] == "I" and k != "I_app":
  745. cell_data[k] = c.current_density_to_nA(v)
  746. for k in cell_data:
  747. cell_data[k] = cell_data[k][indices]
  748. cell_data["t"] -= self.eq_time + self.noise_eq_time + adjust_t
  749. return copy.deepcopy(cell_data)
  750. def _adjust_t(self) -> float:
  751. """Returns the time adjustment for the current secondorder setting."""
  752. if self.dt > 0:
  753. if self.secondorder == 1:
  754. return self.dt / 2
  755. if self.secondorder == 2:
  756. return -self.dt / 2
  757. return 0
  758. def interpolate_data(self,tvec:np.array,t:np.array,y:np.array):
  759. # Remove duplicates and ensure t is strictly increasing
  760. # I think there's a way to do this in NEURON but I havne't figured it out yet.
  761. # This way is janky.
  762. t_sorted, unique_indices = np.unique(t, return_index=True)
  763. y_sorted = y[unique_indices]
  764. cs = CubicSpline(t_sorted, y_sorted)
  765. return cs(tvec)
  766. def get_interpolated_cell_data(self, name: str, tvec: np.array) -> dict:
  767. """Returns an the cell data linearly interpolated to a time vector.
  768. Args:
  769. name (str): cell name to get
  770. tvec (iter): time vector to interpolate to.
  771. Returns:
  772. dict: dictionary of all of the interpolated data
  773. """
  774. cell_data = self.get_cell_data(name)
  775. t = cell_data["t"]
  776. cell_interp = {"t": tvec}
  777. for k, v in cell_data.items():
  778. if k != "t":
  779. cell_interp[k] = self.interpolate_data(tvec, t, v)
  780. return cell_interp
  781. def get_interpolated_syn_data(self, tvec: iter) -> Tuple[dict]:
  782. """Same as Network.get_interpolated_cell_data but interpolates synapse data
  783. Args:
  784. tvec (iter): time vector to interpolate to
  785. Returns:
  786. Tuple[dict]: interpolated electrical data, chemical data
  787. """
  788. chem_data, elec_data = self.get_synaptic_current_data()
  789. if chem_data is not None:
  790. chem_interp = {"t": tvec}
  791. tchem = chem_data["t"]
  792. for k, v in chem_data.items():
  793. if k != "t":
  794. chem_interp[k] = self.interpolate_data(tvec, tchem, v)
  795. else:
  796. chem_interp = None
  797. if elec_data is not None:
  798. elec_interp = {"t": tvec}
  799. telec = elec_data["t"]
  800. for k, v in elec_data.items():
  801. if k != "t":
  802. elec_interp[k] = self.interpolate_data(tvec, telec, v)
  803. else:
  804. elec_interp = None
  805. return chem_interp, elec_interp
  806. def save_state(self,filename:str="state.bin"):
  807. """ Saves the state of the current neuron simulation.
  808. Args:
  809. filename (str): filename of the state file to save to
  810. """
  811. ss = h.SaveState()
  812. ss.save()
  813. sf = h.File(filename)
  814. ss.fwrite(sf)
  815. def restore_state(self,filename:str):
  816. """ Restores the state of the simulation. In order for this to work, the simulation
  817. must be set up exactly the same as when the state file was saved.
  818. Args:
  819. filename (str): name of the state file to restore.
  820. """
  821. h.stdinit()
  822. ss = h.SaveState()
  823. sf = h.File(filename)
  824. ss.fread(sf)
  825. ss.restore()
  826. def generate_metadata(self,voltage_only,folder):
  827. """Interpolate metadata and information regarding the simulation.
  828. Includes NEURON runtime, storage location, integration method, tiemstep and more.
  829. """
  830. def count_syns(d):
  831. count = 0
  832. if isinstance(d, dict):
  833. for value in d.values():
  834. count += count_syns(value) # Recursively count in nested dictionaries
  835. else:
  836. count += 1 # Base case: when it's not a dictionary, it's a value
  837. return count
  838. method = {
  839. 1: "Backwards Euler",
  840. 2: "Crank-Nicholson",
  841. 3: "CVODE"
  842. }
  843. def get_timestep(dt):
  844. if dt == -1:
  845. return "variable"
  846. else:
  847. return f"{dt} ms"
  848. metadata = {"Simulation name": self.sim_name,
  849. "Model file": self.params_file,
  850. "Data saved to": f"./Data/{self.sim_name}_data/",
  851. "NEURON finished in": f"{self.simtime} s",
  852. "Simulation duration": f"{self.simdur} ms",
  853. "Integration method": method[self.integrator],
  854. "Timestep": get_timestep(self.dt),
  855. "Absolute error tolerance": self.atol,
  856. "Number of cells": len(self.cells),
  857. "Number of electrical synapses": int(count_syns(self.electrical_synapses)/2),
  858. "Number of chemical synapses": int(count_syns(self.chemical_synapses)/2)}
  859. if voltage_only:
  860. metadata["Data saved to"] = f"{folder}/{self.sim_name}_data.h5"
  861. if self.noise is not None:
  862. metadata["Noise"] = f"rate = {self.noise['rate']} Hz, \
  863. scale = {self.noise['scale']} uS, tau = {self.noise['tau']} ms"
  864. with open(os.path.join(self.cwd, os.path.join(folder,"info.txt")), 'w') as f:
  865. for key, value in metadata.items():
  866. f.write(f"{key}: {value}\n")

network.py at commit 8b60bc2, under GPL-3.0 · at the source

Overview

Authors: Uri Dickman1,2, Peter J Thomas2,3,4,5,6, Hillel J Chiel3,7,8, John H Byrne9, Curtis L Neveu9
ORCID iDs: Uri Dickman
  1. Department of Mechanical Engineering, University of California, Santa Barbara, Santa Barbara, CA, United States
  2. Department of Mathematics, Applied Mathematics, and Statistics, Case Western Reserve University, Cleveland, OH, United States
  3. Department of Biology, Case Western Reserve University, Cleveland, OH, United States
  4. Department of Cognitive Science, Case Western Reserve University, Cleveland, OH, United States
  5. Department of Electrical, Computer, and Systems Engineering, Case Western Reserve University, Cleveland, OH, United States
  6. Department of Computer and Data Sciences, Case Western Reserve University, Cleveland, OH, United States
  7. Department of Neurosciences, Case Western Reserve University, Cleveland, OH, United States
  8. Department of Biomedical Engineering, Case Western Reserve University, Cleveland, OH, United States
  9. Department of Neurobiology and Anatomy, W.M. Keck Center for the Neurobiology of Learning and Memory, McGovern Medical School at the University of Texas Health Science Center, Houston, TX, United States
Journal: Frontiers in computational neuroscience, volume 20, article 1771884
Dates: received 19 December 2025; accepted 9 April 2026; published online 19 May 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.3389/fncom.2026.1771884 · PMID 42238303 · PMCID PMC13226625 · OpenAlex W7161626892
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: computational modeling (no new data) (modality), other (organism)
Methods: Machine learning
Keywords: Aplysia californica, central pattern generators, conductance-based modeling, NEURON, Python, SNNAP
Topic: Neurobiology and Insect Physiology Research (Cellular and Molecular Neuroscience, Neuroscience), according to OpenAlex
Funding: NINDS NIH HHS (R01 NS118606)
Citations: not cited yet (Europe PMC); 71 references in the paper

Abstract

Introduction: NEURON has been widely used as an empirically-based simulation tool, especially for multi-compartment conductance-based neuronal modeling. The network mediating feeding in Aplysia californica has been extensively studied as a model central pattern generator. Understanding the relationship between network parameter values and their effect on animal behavior is of key importance in systems such as the Aplysia feeding apparatus, where detailed biophysical models can be constructed.

Objective: This study aims to develop a new Python tool called NEURONpyxl that reads parameters from a spreadsheet to construct full neural networks to make it easier to create complex models in the NEURON simulation environment, incorporating short-term forms of plasticity such as depression or facilitation.

Methods: Test simulations from well-understood networks were created in NEURONpyxl, and compared to simulation results of the same network in another neural simulator, the Simulator for Neural Networks and Action Potentials (SNNAP), which has previously been used to model conductance-based networks that include complex synaptic connections and multiple forms of synaptic plasticity. NEURONpyxl was then used to conduct a parameter grid search to optimize conductances in a previously developed network model of Aplysia feeding behavior.

Results: Simulations of the test networks in NEURONpyxl and SNNAP produced numerically equivalent results, with differences remaining within the expected margin of error arising from numerical integration and implementation details. We then located parameter values that generated simulated motor patterns with durations of protraction and retraction that matched biological feeding behavior under different mechanical loads.

Conclusion: NEURONpyxl simplifies building and simulating complex neural networks with different forms of synaptic plasticity, and locating physiologically relevant parameter values. With NEURONpyxl, future work may include the creation of ensembles of network models and the integration of biomechanics with complex conductance-based networks.

Reproduced under the paper's license (CC BY), from the paper cited above.

Repositories

Its files are read in the Code ↔ Paper reader above, with 13 matches between paragraphs and lines of code.

CWRUChielLab/neuronpyxl

License: GPL-3.0
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: 8b60bc23871401509b5800aa525d1c8708cb9b0f, 9 June 2026
Languages: Python (14), NEURON (9)
Size: 37 files, 23 scripts
Software Heritage: not archived
Found in: “Data availability statement”
Holds: license file, environment (environment.yml, setup.py), documentation
Not found: README, CITATION.cff, tests, continuous integration
Tools: NEURON (15 files), NumPy (6 files), pandas (6 files), Matplotlib (5 files), SciPy (1 file)
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
24 files

CWRUChielLab/NEURONpyxl-2026-figures

License: none: the authors keep all their rights
State: the link answers, verified on 28 September 2026
Evidence: files inventoried
Commit: f61a6bdc20ad01dce46666698760893643e7e021, 18 May 2026
Languages: Python (17)
Size: 30 files, 17 scripts
Software Heritage: not archived
Found in: “Data availability statement”
Holds: README
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: pandas (13 files), Matplotlib (12 files), NumPy (12 files), SciPy (3 files), NEURON (2 files)
Availability: 1 check, the latest on 28 September 2026: the link answers
  • 28 September 2026: the link answers
18 files, not copied: shown from their source

OSCR keeps no copy of these files: this repository has no license that allows it. The reader above shows each one from its source, fetched by your browser at commit f61a6bd, when its fingerprint is the one OSCR verified. How this works.

The paper's code and data availability statement is in the Data section.

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 2 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 40 scripts, each with its path and the digest of its content;
  • 13 matches between paragraphs of the paper and lines of the code (method lexical-v1);
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

Datasets cited

Data availability statement

The datasets presented in this study can be found in online repositories. The names of the repository/repositories and accession number(s) can be found below: https://doi.org/10.5061/dryad.1c59zw488, Dryad; https://github.com/CWRUChielLab/neuronpyxl and https://github.com/CWRUChielLab/NEURONpyxl-2026-figures, GitHub.

Reproduced under the paper's license (CC BY), from the paper cited above.

Versions

The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.

Version 1, 28 September 2026: the first record

Recorded: type, language, journal, volume, pages, dates, 5 authors, 6 keywords, 1 funder, 70 references.

Cite

This paper

Dickman, U., Thomas, P. J., Chiel, H. J., Byrne, J. H., & Neveu, C. L. (2026). NEURONpyxl: fast, flexible, Python-integrated simulation of biophysical neural networks with complex plastic synapses. Frontiers in computational neuroscience, 20, 1771884. https://doi.org/10.3389/fncom.2026.1771884

BibTeX

@article{dickman2026neuronpyxl,
author = {Dickman, Uri and Thomas, Peter J and Chiel, Hillel J and Byrne, John H and Neveu, Curtis L},
title = {{NEURONpyxl: fast, flexible, Python-integrated simulation of biophysical neural networks with complex plastic synapses}},
journal = {Frontiers in computational neuroscience},
year = {2026},
month = may,
volume = {20},
pages = {1771884},
publisher = {Frontiers Media SA},
issn = {1662-5188},
doi = {10.3389/fncom.2026.1771884},
url = {https://doi.org/10.3389/fncom.2026.1771884},
pmid = {42238303},
pmcid = {PMC13226625}
}

RIS

TY - JOUR
AU - Dickman, Uri
AU - Thomas, Peter J
AU - Chiel, Hillel J
AU - Byrne, John H
AU - Neveu, Curtis L
TI - NEURONpyxl: fast, flexible, Python-integrated simulation of biophysical neural networks with complex plastic synapses
T2 - Frontiers in computational neuroscience
J2 - Front Comput Neurosci
PY - 2026
DA - 2026/05/19
VL - 20
SP - 1771884
SN - 1662-5188
PB - Frontiers Media SA
DO - 10.3389/fncom.2026.1771884
UR - https://doi.org/10.3389/fncom.2026.1771884
LA - en
ER -

CSL-JSON

{
"id": "10.3389/fncom.2026.1771884",
"type": "article-journal",
"title": "NEURONpyxl: fast, flexible, Python-integrated simulation of biophysical neural networks with complex plastic synapses",
"container-title": "Frontiers in computational neuroscience",
"author": [
{
"family": "Dickman",
"given": "Uri"
},
{
"family": "Thomas",
"given": "Peter J"
},
{
"family": "Chiel",
"given": "Hillel J"
},
{
"family": "Byrne",
"given": "John H"
},
{
"family": "Neveu",
"given": "Curtis L"
}
],
"container-title-short": "Front Comput Neurosci",
"volume": "20",
"page": "1771884",
"DOI": "10.3389/fncom.2026.1771884",
"PMID": "42238303",
"PMCID": "PMC13226625",
"ISSN": "1662-5188",
"publisher": "Frontiers Media SA",
"URL": "https://doi.org/10.3389/fncom.2026.1771884",
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
19
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi:10.1016/j.isci.2026.117375 [code]
Motor priming is associated with widespread recruitment into neural ensembles and more rapid ensemble transitions.
Journal: iScience
In common: pandas, SciPy, Matplotlib, 1 other tool, other, 11 references
[2] doi:10.1016/j.celrep.2026.117793 [code]
Clustered inputs engage dendritic nonlinearities and calcium signaling to support efficient place-field formation in CA1 pyramidal neurons.
Journal: Cell reports
In common: NEURON, pandas, SciPy, 2 other tools, computational modeling (no new data), 1 reference
[3] doi:10.1093/bioinformatics/btag328 [code]
eFEL: electrophysiology feature extraction library.
Journal: Bioinformatics (Oxford, England)
In common: NEURON, pandas, SciPy, 2 other tools, 1 reference
[4] doi:10.1126/sciadv.aec3961 [code]
Linking functional and structural dendritic spine remodeling during fear learning and extinction in vivo.
Journal: Science advances
In common: NEURON, pandas, SciPy, 2 other tools, 1 reference
[5] doi:10.1371/journal.pcbi.1014304 [code]
Linking reduced prefrontal microcircuit inhibition in schizophrenia to EEG biomarkers in silico.
Journal: PLoS computational biology
In common: NEURON, pandas, SciPy, 2 other tools, 1 reference
[6] doi:10.1371/journal.pcbi.1014458 [code]
Neuronal excitability and parameter variability in the Hodgkin-Huxley model.
Journal: PLoS computational biology
In common: pandas, SciPy, Matplotlib, 1 other tool, computational modeling (no new data), 2 references
[7] doi:10.1371/journal.pcbi.1014337 [code]
Fast reconstruction of degenerate populations of conductance-based neuron models from spike times.
Journal: PLoS computational biology
In common: pandas, SciPy, Matplotlib, 1 other tool, computational modeling (no new data), 2 references
[8] doi:10.1038/s41467-026-75704-3 [code]
A minimal model of working memory in neural systems and neuromorphic circuits.
Journal: Nature communications
In common: SciPy, Matplotlib, NumPy, computational modeling (no new data), 2 references
[9] doi:10.7554/elife.89629 [code]
Active dendrites enable robust spiking computations despite timing jitter.
Journal: eLife
In common: NEURON, pandas, Matplotlib, 1 other tool, 1 reference
[10] doi:10.1007/s12021-025-09766-x [code]
The Neural Analysis Toolkit Unifies Semi-Analytical Techniques to Simplify, Understand, and Simulate Dendrites.
Journal: Neuroinformatics
In common: computational modeling (no new data), 3 references

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

Request its removal

To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).

Discussion, reproductions, activity

Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.

Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.