OSCR

Dynamic cholinergic signaling differentially desynchronizes cortical microcircuits dependent on modulation rate and network connectivity.

Code ↔ Paper

5 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 5 matches
  1. [1] § Materials and methods › Neuron model ↔ Simul_funcs_and_data.py, lines 24–33 · score 0.76 · leak channel, delayed rectifier, reversal potentials, synaptic
  2. [2] § Results › Synaptic connectivity strengths shape the response to dynamic cholinergic modulation ↔ Figure1.py, lines 24–85 · score 0.66 · physiologically unrealistic, depolarization block, firing frequency, curve, Figure 1, neurons
  3. [3] § Materials and methods › Simulations ↔ Figure1.py, lines 24–85 · score 0.59 · Runge Kutta, allow initial transients, decay, simulations
  4. [4] § Results › Synaptic connectivity strengths shape the response to dynamic cholinergic modulation ↔ Simul_funcs_and_data.py, lines 238–286 · score 0.58 · neuron approximately constant, firing frequency, excitatory neuron, synaptic weight, Linear, excitability
  5. [5] § Materials and methods › Network structure ↔ Simul_funcs_and_data.py, lines 238–286 · score 0.54 · neuronal excitability, firing frequencies, inhibitory cells, declines, mS, spike

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 · 575 lines · 25 KB · GPL-3.0 · 3 matches

  1. import numpy as np
  2. import json
  3. import decimal
  4. from bisect import bisect_left
  5. # Data used in simulation
  6. with open('ficurves.json', 'r') as file:
  7. fi_curves = json.load(file)
  8. # F-I curves stored as a nested dictionary
  9. # The outer dictionary has 151 string keys representing g_ks values (in mS) from "0.0" to "1.5" in 0.01 increments
  10. # Each inner dictionary maps frequencies (Hz) to the current (µA) needed to trigger neuron oscillations at that frequency for the given g_ks value
  11. with open('ficurves_keys.json', 'r') as file:
  12. fi_curves_keys = json.load(file)
  13. # A list of lists, where each inner list contains the available frequency keys (in Hz) for a specific g_ks value
  14. # First list corresponds to g_ks 0.0 mS and the final list corresponds to 1.5 mS, with 0.01 mS increments in each list
  15. with open('ficurves_inh.json', 'r') as file:
  16. inh_currents = json.load(file)
  17. # Dictionary to use for applied currents of inhibitory cells
  18. # The dictionary has 151 string keys representing g_ks values (in mS) from "0.0" to "1.5" in 0.01 increments
  19. # Values are currents required to keep neurons slightly below the threshold current required to elicit spikes at the given g_ks value
  20. # Simulation parameters
  21. E_na = 55 # Na channel reversal potential in mV
  22. E_k = -90 # K channel reversal potential in mV
  23. E_l = -60 # Leak channel reversal potential in mV
  24. E_syn_exc = 0 # Synaptic current reversal potential for excitatory cells in mV
  25. E_syn_inh = -75 # Synaptic current reversal potential for inhibitory cells in mV
  26. g_na = 24 # Maximum conductance of Na channel in mS
  27. g_kd = 3 # Maximum conductance of Delayed Rectifier K channel in mS
  28. g_l = 0.02 # Maximum conductance of Leak channel in mS
  29. # Functions used in simulation
  30. def create_g_ks_t(t_max, g_ks_zero_time=None, timestep = 0.1):
  31. """
  32. This function generates a g_ks_t (m-channel conductance) time series.
  33. For the first 1000 ms, g_ks is held constant at 1.5 mS. After that, it decreases linearly to 0 mS,
  34. reaching 0 at g_ks_zero_time (if specified) or at the end of the simulation (t_max).
  35. Inputs:
  36. t_max (int): Length of simulation in ms
  37. g_ks_zero_time (int, optional): Time in ms when g_ks should reach 0. Must be greater than 1000 ms and lower than t_max
  38. timestep (float, optional): Integration time step in ms (default is 0.1 ms)
  39. Outputs:
  40. g_ks_t (numpy array): Time series of g_ks values, at each simulation step
  41. """
  42. start_value = 1.5 # mS
  43. end_value = 0 # mS
  44. warm_up_time = 1000 # ms
  45. if g_ks_zero_time is None:
  46. g_ks_zero_time = t_max
  47. # Initialize array
  48. g_ks_t = start_value * np.ones(int(t_max / timestep))
  49. warm_up_step = int(warm_up_time / timestep)
  50. decline_end_step = int(g_ks_zero_time / timestep)
  51. # Linear decline
  52. g_ks_t[warm_up_step:decline_end_step] = np.linspace(start_value, end_value, decline_end_step - warm_up_step)
  53. # If decline ends before t_max, hold at 0 after
  54. if decline_end_step < len(g_ks_t):
  55. g_ks_t[decline_end_step:] = 0
  56. return g_ks_t
  57. def m_inf(voltage):
  58. return 1 / (1 + np.exp((-voltage - 30) / 9.5))
  59. def h_inf(voltage):
  60. return 1 / (1 + np.exp((voltage + 53) / 7.0))
  61. def n_inf(voltage):
  62. return 1 / (1 + np.exp((-voltage - 30) / 10))
  63. def z_inf(voltage):
  64. return 1 / (1 + np.exp((-voltage - 39) / 5))
  65. def tau_h(voltage):
  66. return 0.37 + 2.78 / (1 + np.exp((voltage + 40.5) / 6))
  67. def tau_n(voltage):
  68. return 0.37 + 1.85 / (1 + np.exp((voltage + 27) / 15))
  69. tau_z = 75
  70. def rk_slope(voltage, app_current, syn_current, h_gate, n_gate, z_gate, g_ks, timestep = 0.1):
  71. """
  72. Computes the change in state variables using the 4th-order Runge-Kutta method for one time step,
  73. for the neuron model described in the Materials and Methods section.
  74. Inputs:
  75. voltage (float): Membrane potential (mV)
  76. app_current (float): Applied current (µA)
  77. syn_current (float): Synaptic current (µA)
  78. h_gate (float): h gating variable
  79. n_gate (float): n gating variable
  80. z_gate (float): z gating variable
  81. g_ks (float): m-channel conductance (mS)
  82. timestep (float, optional): Integration time step in ms (default is 0.1 ms)
  83. Outputs:
  84. dh (float): Change in h gating variable
  85. dn (float): Change in n gating variable
  86. dz (float): Change in z gating variable
  87. dv (float): Change in membrane potential
  88. """
  89. k_h1 = timestep * (h_inf(voltage) - h_gate) / tau_h(voltage)
  90. k_n1 = timestep * (n_inf(voltage) - n_gate) / tau_n(voltage)
  91. k_z1 = timestep * (z_inf(voltage) - z_gate) / tau_z
  92. k_v1 = timestep * (-g_na * ((m_inf(voltage)) ** 3) * h_gate * (voltage - E_na) - g_kd * (n_gate ** 4) * (
  93. voltage - E_k) - g_ks * z_gate * (voltage - E_k) - g_l * (voltage - E_l) + app_current - syn_current)
  94. k_h2 = timestep * (h_inf(voltage + k_v1 / 2) - (h_gate + k_h1 / 2)) / tau_h(voltage + k_v1 / 2)
  95. k_n2 = timestep * (n_inf(voltage + k_v1 / 2) - (n_gate + k_n1 / 2)) / tau_n(voltage + k_v1 / 2)
  96. k_z2 = timestep * (z_inf(voltage + k_v1 / 2) - (z_gate + k_z1 / 2)) / tau_z
  97. k_v2 = timestep * (-g_na * ((m_inf(voltage + k_v1 / 2)) ** 3) * (h_gate + k_h1 / 2) * (
  98. voltage + k_v1 / 2 - E_na) - g_kd * ((n_gate + k_n1 / 2) ** 4) * (voltage + k_v1 / 2 - E_k) - g_ks * (
  99. z_gate + k_z1 / 2) * (voltage + k_v1 / 2 - E_k) - g_l * (
  100. voltage + k_v1 / 2 - E_l) + app_current - syn_current)
  101. k_h3 = timestep * (h_inf(voltage + k_v2 / 2) - (h_gate + k_h2 / 2)) / tau_h(voltage + k_v2 / 2)
  102. k_n3 = timestep * (n_inf(voltage + k_v2 / 2) - (n_gate + k_n2 / 2)) / tau_n(voltage + k_v2 / 2)
  103. k_z3 = timestep * (z_inf(voltage + k_v2 / 2) - (z_gate + k_z2 / 2)) / tau_z
  104. k_v3 = timestep * (-g_na * ((m_inf(voltage + k_v2 / 2)) ** 3) * (h_gate + k_h2 / 2) * (
  105. voltage + k_v2 / 2 - E_na) - g_kd * ((n_gate + k_n2 / 2) ** 4) * (voltage + k_v2 / 2 - E_k) - g_ks * (
  106. z_gate + k_z2 / 2) * (voltage + k_v2 / 2 - E_k) - g_l * (
  107. voltage + k_v2 / 2 - E_l) + app_current - syn_current)
  108. k_h4 = timestep * (h_inf(voltage + k_v3) - (h_gate + k_h3)) / tau_h(voltage + k_v3)
  109. k_n4 = timestep * (n_inf(voltage + k_v3) - (n_gate + k_n3)) / tau_n(voltage + k_v3)
  110. k_z4 = timestep * (z_inf(voltage + k_v3) - (z_gate + k_z3)) / tau_z
  111. k_v4 = timestep * (-g_na * ((m_inf(voltage + k_v3)) ** 3) * (h_gate + k_h3) * (voltage + k_v3 - E_na) - g_kd * (
  112. (n_gate + k_n3) ** 4) * (voltage + k_v3 - E_k) - g_ks * (z_gate + k_z3) * (
  113. voltage + k_v3 - E_k) - g_l * (voltage + k_v3 - E_l) + app_current - syn_current)
  114. dh = (k_h1 + 2 * k_h2 + 2 * k_h3 + k_h4) / 6
  115. dn = (k_n1 + 2 * k_n2 + 2 * k_n3 + k_n4) / 6
  116. dz = (k_z1 + 2 * k_z2 + 2 * k_z3 + k_z4) / 6
  117. dv = (k_v1 + 2 * k_v2 + 2 * k_v3 + k_v4) / 6
  118. return dh, dn, dz, dv
  119. def take_closest(myList, myNumber):
  120. """
  121. Returns the value in a sorted list that is closest to a given number.
  122. If two values are equally close, the smaller one is returned.
  123. Inputs:
  124. myList (list of floats or ints): A sorted list of numbers.
  125. myNumber (float or int): The target number to find the closest value to.
  126. Outputs:
  127. float or int: The value from myList closest to myNumber.
  128. """
  129. pos = bisect_left(myList, myNumber)
  130. if pos == 0:
  131. return myList[0]
  132. if pos == len(myList):
  133. return myList[-1]
  134. before = myList[pos - 1]
  135. after = myList[pos]
  136. if after - myNumber < myNumber - before:
  137. return after
  138. else:
  139. return before
  140. # Look up tables for exponential functions used for synaptic current
  141. # See equation under Network Structure in Materials and Methods
  142. tau_r = 0.2 # ms
  143. tau_d_e = 3 # for excitarory synapses, in ms
  144. tau_d_i = 5.5 # for inhibitory synapses, in ms
  145. double_exp_list1 = [0] * 5001 # Look up table for excitatory synapses
  146. for num in range(0, 5001):
  147. double_exp_list1[num] = np.exp(-(num * 0.01) / tau_d_e) - np.exp(-(num * 0.01) / tau_r)
  148. double_exp_list2 = [0] * 5001 # Look up table for inhibitory synapses
  149. for num in range(0, 5001):
  150. double_exp_list2[num] = np.exp(-(num * 0.01) / tau_d_i) - np.exp(-(num * 0.01) / tau_r)
  151. def record_spike(voltage, spike_threshold, step,
  152. should_record_spike, neuron_list, timestep = 0.1):
  153. """
  154. Records neuron's spike times based on its membrane potential.
  155. Inputs:
  156. voltage (float): Membrane potential of neuron at a given time (mV)
  157. spike_threshold (int): Threshold voltage in mV above which a spike is recorded
  158. step (int): Simulation time step
  159. should_record_spike (Boolean): Flag indicating if neuron can currently record a spike
  160. neuron_list (list of floats): Neuron spikes times in ms
  161. timestep (float, optional): Integration time step in ms (default is 0.1 ms)
  162. Outputs:
  163. should_record_spike (Boolean): Flag indicating if neuron can currently record a spike.
  164. """
  165. if should_record_spike:
  166. if voltage > spike_threshold:
  167. neuron_list.append(timestep * step) # Record spike
  168. should_record_spike = False # Wait until voltage goes below spike threshold before detecting next spike
  169. else:
  170. if voltage < spike_threshold:
  171. should_record_spike = True # Reset should_record_spike if neuron voltage falls below spike threshold
  172. return should_record_spike
  173. def simulation(EI_connectivity_strength, IE_connectivity_strength, II_connectivity_strength,
  174. EE_connectivity_strength, current_modulation, inh_modulation, t_max, dt = 0.1, static_g_ks=None, g_ks_zero_time=None):
  175. """
  176. This function sets up a network with 800 excitatory and 200 inhibitory neurons,
  177. using the equations specified under Neuron Model in Materials and Methods.
  178. Numerical solution is calculated over the specified time period.
  179. Cholinergic modulation is introduced through g_ks linear decline. By default, g_ks is set to reach 0 mS at t_max.
  180. Current modulation can be enabled to keep firing frequencies of neurons approximately constant, accounting for cholinergic modulation's influence on neuronal
  181. excitability.
  182. Inputs:
  183. EI_connectivity_strength (float): Synaptic weight of excitatory to inhibitory connections in mS
  184. IE_connectivity_strength (float): Synaptic weight of inhibitory to excitatory connections in mS
  185. II_connectivity_strength (float): Synaptic weight of inhibitory to inhibitory connections in mS
  186. EE_connectivity_strength (float): Synaptic weight of excitatory to excitatory connections in mS
  187. current_modulation (Boolean): Flag to enable/disable current modulation for all neurons
  188. inh_modulation (Boolean): Flag to enable/disable inhibitory neuron g_ks modulation. If set to 0, inhibitory cells' g_ks is set to 0 mS.
  189. t_max (int): Length of simulation in ms
  190. dt (float, optional): Integration time step in ms (default is 0.1 ms)
  191. static g_ks (float, optional): Specify to set g_ks to any constant value in mS for all cells (will not override inh_modulation).
  192. g_ks_zero_time (int, optional): Time in ms when g_ks should reach 0. Must be greater than 1000 ms and lower than t_max
  193. Outputs:
  194. neuron_list_exc_sorted (dict of dicts):
  195. Nested dictionary containing excitatory neurons sorted by firing frequency.
  196. - 800 string keys ("0" to "799")
  197. - Each key maps to a dictionary with:
  198. - "spike times": List of floats representing spike times in ms in chronological order.
  199. neuron_list_inh (dict of dicts):
  200. Nested dictionary containing inhibitory neurons sorted by firing frequency.
  201. - 200 string keys ("0" to "199")
  202. - Each key maps to a dictionary with:
  203. - "spike times": List of floats representing spike times in ms in chronological order.
  204. exc_currs (list of floats):
  205. Applied current in µA to an excitatory neuron with average firing frequency at each simulation step.
  206. g_ks_t (numpy array): Time series of g_ks values, at each simulation step.
  207. """
  208. # Total number of steps in simulation
  209. steps = int(t_max / dt)
  210. #Computing g_ks_t
  211. g_ks_t = create_g_ks_t(t_max, timestep=dt) # Sets rate of g_ks linear decline such that g_ks reaches 0 at t_max
  212. if g_ks_zero_time !=None:
  213. g_ks_t = create_g_ks_t(t_max, timestep=dt, g_ks_zero_time=g_ks_zero_time)
  214. if static_g_ks != None:
  215. g_ks_t = np.ones(steps) * static_g_ks
  216. # Generate Neurons
  217. number_of_neurons = 1000
  218. number_of_exc_neurons = 800 # 200 inhibitory cells
  219. # Initialize data related to each excitatory neuron - current, spike times, selected firing frequency
  220. neuron_list_exc = {
  221. neuron: {"current": 0, "spike times": [], "frequency": 0}
  222. for neuron in range(number_of_exc_neurons)
  223. }
  224. # Initialize data related to each inhibitory neuron - current, spike times, selected random value to modify current
  225. neuron_list_inh = {
  226. neuron: {"current": 0, "spike times": [], "current random seed": 0}
  227. for neuron in range(number_of_neurons - number_of_exc_neurons)
  228. }
  229. # Initialize connectivity matrix
  230. g_syn = np.zeros((number_of_neurons, number_of_neurons))
  231. # Create EE connections (excitatory to excitatory)
  232. for index in np.ndindex((number_of_exc_neurons, number_of_exc_neurons)):
  233. probability_of_synapse = 0.3
  234. g_syn[index] = np.random.choice(
  235. [EE_connectivity_strength, 0],
  236. p=[probability_of_synapse, 1 - probability_of_synapse]
  237. )
  238. if index[0] == index[1]: # No self-synapses
  239. g_syn[index] = 0
  240. # Create IE connections (inhibitory to excitatory)
  241. for index in np.ndindex((number_of_exc_neurons, number_of_neurons - number_of_exc_neurons)):
  242. probability_of_synapse = 0.5
  243. g_syn[index[0], index[1] + number_of_exc_neurons] = np.random.choice(
  244. [IE_connectivity_strength, 0],
  245. p=[probability_of_synapse, 1 - probability_of_synapse]
  246. )
  247. # Create EI connections (excitatory to inhibitory)
  248. for index in np.ndindex((number_of_neurons - number_of_exc_neurons, number_of_exc_neurons)):
  249. probability_of_synapse = 0.5
  250. g_syn[index[0] + number_of_exc_neurons, index[1]] = np.random.choice(
  251. [EI_connectivity_strength, 0],
  252. p=[probability_of_synapse, 1 - probability_of_synapse]
  253. )
  254. # Create II Connections (inhibitory to inhibitory)
  255. for index in np.ndindex((number_of_neurons - number_of_exc_neurons, number_of_neurons - number_of_exc_neurons)):
  256. probability_of_synapse = 0.3
  257. g_syn[index[0] + number_of_exc_neurons, index[1] + number_of_exc_neurons] = np.random.choice(
  258. [II_connectivity_strength, 0],
  259. p=[probability_of_synapse, 1 - probability_of_synapse]
  260. )
  261. if index[0] == index[1]: # No self-synapses
  262. g_syn[index[0] + number_of_exc_neurons, index[1] + number_of_exc_neurons] = 0
  263. # Set Applied Current
  264. # Excitatory neurons are selected to fire at a frequency randomly between 45 and 55Hz
  265. for neuron_no in range(number_of_exc_neurons):
  266. neuron_list_exc[neuron_no]["frequency"] = np.random.uniform(45, 55)
  267. # Set a single excitatory neuron (402) firing frequency to 50Hz to track its applied current over time
  268. neuron_list_exc[402]["frequency"] = 50
  269. # Inhibitory neurons have applied current set slightly below threshold current required to fire, mulitplied by a random modifier
  270. for neuron_no in range(number_of_neurons - number_of_exc_neurons):
  271. neuron_list_inh[neuron_no]["current random seed"] = np.random.uniform(0.90476, 1) #Random modifier
  272. # Initialize simulation parameters
  273. i_hyp = np.zeros(number_of_neurons)
  274. v = np.zeros((number_of_neurons, 5)) # Voltage
  275. h = np.zeros((number_of_neurons, 5)) # h-gate
  276. z = np.zeros((number_of_neurons, 5)) # z-gate
  277. n = np.zeros((number_of_neurons, 5)) # n-gate
  278. # Set random initial conditions for all neurons
  279. for neuron_no in range(number_of_neurons):
  280. v[neuron_no, 0] = np.random.uniform(-62, -22) #mV
  281. h[neuron_no, 0] = np.random.uniform(0.2, 0.8)
  282. z[neuron_no, 0] = np.random.uniform(0.15, 0.25)
  283. n[neuron_no, 0] = np.random.uniform(0.2, 0.8)
  284. spike_threshold = 0 # Spikes are detected when voltage crosses 0 mV
  285. should_record_spike = [True] * number_of_neurons # Flag for spike detection
  286. g_syn_original = np.copy(g_syn) # Store original g_syn matrix before modification
  287. # Decimal for exact representation to avoid floating-point errors
  288. zero_point_zero_one = decimal.Decimal('0.01')
  289. # Initialize list which will contain values of applied currents to neuron 402 at each step
  290. exc_currs = [0]
  291. # Computing numerical solution
  292. for i in range(1, steps): # Loop over each time step in simulation
  293. update_no = i % 5 # Updating modulo 5 index to remember only 5 values of v,h,z,n at a time
  294. rounded_g_ks = decimal.Decimal(str(round(g_ks_t[i], 2)))
  295. # Calculate 'i_hyp': component of synaptic current from spike times
  296. # (see equation under Network Structure in Materials and Methods)
  297. for neuron_no in range(number_of_exc_neurons):
  298. for spike_time in neuron_list_exc[neuron_no]["spike times"]:
  299. if (dt * i - spike_time) < 50 and dt * i > 100:
  300. time_difference = dt * i - spike_time
  301. i_hyp[neuron_no] += double_exp_list1[int(round(time_difference, 2) * 100)]
  302. for neuron_no in range(number_of_neurons - number_of_exc_neurons):
  303. for spike_time in neuron_list_inh[neuron_no]["spike times"]:
  304. if (dt * i - spike_time) < 50 and dt * i > 100:
  305. time_difference = dt * i - spike_time
  306. i_hyp[neuron_no + number_of_exc_neurons] += double_exp_list2[int(round(time_difference, 2) * 100)]
  307. # Modify g_syn connectivity matrix to include respective (voltage - E_syn) term
  308. # See equation under Network Structure in Materials and Methods
  309. # EE connections
  310. g_syn[:number_of_exc_neurons, :number_of_exc_neurons] *= np.reshape(
  311. np.repeat((v[:number_of_exc_neurons, update_no - 1] - E_syn_exc), number_of_exc_neurons),
  312. (number_of_exc_neurons, number_of_exc_neurons)
  313. )
  314. # IE connections
  315. g_syn[:number_of_exc_neurons, number_of_exc_neurons:number_of_neurons] *= np.reshape(
  316. np.repeat((v[:number_of_exc_neurons, update_no - 1] - E_syn_inh),
  317. number_of_neurons - number_of_exc_neurons),
  318. (number_of_exc_neurons, number_of_neurons - number_of_exc_neurons)
  319. )
  320. # EI connections
  321. g_syn[number_of_exc_neurons:number_of_neurons, :number_of_exc_neurons] *= np.reshape(
  322. np.repeat((v[number_of_exc_neurons:number_of_neurons, update_no - 1] - E_syn_exc),
  323. number_of_exc_neurons),
  324. (number_of_neurons - number_of_exc_neurons, number_of_exc_neurons)
  325. )
  326. # II connections
  327. g_syn[number_of_exc_neurons:number_of_neurons, number_of_exc_neurons:number_of_neurons] *= np.reshape(
  328. np.repeat((v[number_of_exc_neurons:number_of_neurons, update_no - 1] - E_syn_inh),
  329. number_of_neurons - number_of_exc_neurons),
  330. (number_of_neurons - number_of_exc_neurons, number_of_neurons - number_of_exc_neurons)
  331. )
  332. # Synaptic current calculation
  333. i_syn = g_syn @ i_hyp
  334. # Update each excitatory neuron
  335. for neuron_no in range(number_of_exc_neurons):
  336. # Set applied current based on whether current modulation is applied
  337. if current_modulation: # Selects a current that preserves selected firing frequency
  338. neuron_list_exc[neuron_no]["current"] = fi_curves[str(rounded_g_ks)][
  339. str(take_closest(fi_curves_keys[int(rounded_g_ks / zero_point_zero_one)],
  340. neuron_list_exc[neuron_no]["frequency"]))
  341. ]
  342. else:
  343. neuron_list_exc[neuron_no]["current"] = fi_curves[str(1.5)][
  344. str(take_closest(fi_curves_keys[150],
  345. neuron_list_exc[neuron_no]["frequency"]))]
  346. # Store neuron 402's applied current
  347. if neuron_no == 402:
  348. exc_currs.append(neuron_list_exc[neuron_no]["current"])
  349. # Runge-Kutta step
  350. dh, dn, dz, dv = rk_slope(
  351. v[neuron_no, update_no - 1],
  352. neuron_list_exc[neuron_no]["current"],
  353. i_syn[neuron_no],
  354. h[neuron_no, update_no - 1],
  355. n[neuron_no, update_no - 1],
  356. z[neuron_no, update_no - 1],
  357. g_ks_t[i],
  358. timestep = dt
  359. )
  360. h[neuron_no, update_no] = h[neuron_no, update_no - 1] + dh
  361. n[neuron_no, update_no] = n[neuron_no, update_no - 1] + dn
  362. z[neuron_no, update_no] = z[neuron_no, update_no - 1] + dz
  363. v[neuron_no, update_no] = v[neuron_no, update_no - 1] + dv
  364. # Store spike time if spike is triggered and modify spike detection flag
  365. should_record_spike[neuron_no] = record_spike(v[neuron_no, update_no], spike_threshold, i, should_record_spike[neuron_no], neuron_list_exc[neuron_no]["spike times"], timestep=dt)
  366. # Update each inhibitory neuron
  367. for neuron_no in range(number_of_exc_neurons, number_of_neurons):
  368. inh_neuron_no = neuron_no - number_of_exc_neurons
  369. # Set applied current based on modulation parameters
  370. if current_modulation and inh_modulation:
  371. neuron_list_inh[inh_neuron_no]["current"] = (
  372. inh_currents[str(rounded_g_ks)] *
  373. neuron_list_inh[inh_neuron_no]["current random seed"]
  374. )
  375. elif not current_modulation and inh_modulation:
  376. neuron_list_inh[inh_neuron_no]["current"] = (
  377. inh_currents[str(1.5)] *
  378. neuron_list_inh[inh_neuron_no]["current random seed"]
  379. )
  380. else:
  381. neuron_list_inh[inh_neuron_no]["current"] = (
  382. inh_currents[str(0.0)] *
  383. neuron_list_inh[inh_neuron_no]["current random seed"]
  384. )
  385. # Runge-Kutta step based on whether g_ks modulation is applied
  386. if inh_modulation:
  387. dh, dn, dz, dv = rk_slope(
  388. v[neuron_no, update_no - 1],
  389. neuron_list_inh[inh_neuron_no]["current"],
  390. i_syn[neuron_no],
  391. h[neuron_no, update_no - 1],
  392. n[neuron_no, update_no - 1],
  393. z[neuron_no, update_no - 1],
  394. g_ks_t[i],
  395. timestep = dt
  396. )
  397. else:
  398. dh, dn, dz, dv = rk_slope(
  399. v[neuron_no, update_no - 1],
  400. neuron_list_inh[inh_neuron_no]["current"],
  401. i_syn[neuron_no],
  402. h[neuron_no, update_no - 1],
  403. n[neuron_no, update_no - 1],
  404. z[neuron_no, update_no - 1],
  405. 0,
  406. timestep = dt
  407. )
  408. h[neuron_no, update_no] = h[neuron_no, update_no - 1] + dh
  409. n[neuron_no, update_no] = n[neuron_no, update_no - 1] + dn
  410. z[neuron_no, update_no] = z[neuron_no, update_no - 1] + dz
  411. v[neuron_no, update_no] = v[neuron_no, update_no - 1] + dv
  412. # Store spike time if spike is triggered and modify spike detection flag
  413. should_record_spike[neuron_no] = record_spike(v[neuron_no, update_no], spike_threshold, i, should_record_spike[neuron_no], neuron_list_inh[inh_neuron_no]["spike times"], timestep=dt)
  414. # Reset before next loop
  415. i_hyp[:] = 0
  416. np.copyto(g_syn, g_syn_original)
  417. # Prepare spike lists for synchrony measure computation
  418. exc_spike_list_for_golomb = [
  419. neuron_list_exc[neuron]["spike times"] for neuron in range(number_of_exc_neurons)
  420. ]
  421. inh_spike_list_for_golomb = [
  422. neuron_list_inh[neuron]["spike times"] for neuron in range(number_of_neurons - number_of_exc_neurons)
  423. ]
  424. # Sort excitatory neuron spike lists by firing frequency for raster plots
  425. neuron_list_exc_sort_order = sorted(
  426. neuron_list_exc.items(),
  427. key=lambda item: item[1]["frequency"],
  428. reverse=True
  429. )
  430. neuron_list_exc_sorted = {
  431. i: neuron_data for i, (original_index, neuron_data) in enumerate(neuron_list_exc_sort_order)
  432. }
  433. return neuron_list_exc_sorted, neuron_list_inh, exc_currs, g_ks_t

Simul_funcs_and_data.py at commit 722d1db, under GPL-3.0 · at the source

Overview

Authors: Sibi Pandian1,2, Scott Rich1,2,3
ORCID iDs: Scott Rich
  1. Department of Physiology and Neurobiology, University of Connecticut, Storrs, Connecticut, United States of America
  2. Department of Biomedical Engineering, University of Connecticut, Storrs, Connecticut, United States of America
  3. Department of Mathematics and Institute for the Brain and Cognitive Sciences, University of Connecticut, Storrs, Connecticut, United States of America
Journal: PLoS computational biology, volume 22, issue 4, article e1013252
Dates: received 18 June 2025; accepted 1 April 2026; published online 10 April 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.1371/journal.pcbi.1013252 · PMID 41961884 · PMCID PMC13095133 · OpenAlex W7153209897
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: computational modeling (no new data) (modality), human (organism), cellular / molecular (subfield)
MeSH: Acetylcholine*, Cerebral Cortex*, Models, Neurological*, Nerve Net*, Signal Transduction*, Action Potentials, Animals, Computational Biology, Computer Simulation, Humans, Neurons, Synapses, Synaptic Transmission (* major topic)
Journal subjects: Biology and Life Sciences, Biochemistry, Neurochemistry, Neurotransmitters, Cholinergics, Neuroscience, Cell Biology, Cellular Types, Animal Cells, Neurons, Cellular Neuroscience, Anatomy, Nervous System, Synapses, Medicine and Health Sciences, Physiology, Electrophysiology, Neurophysiology, Computer and Information Sciences, Neural Networks, Engineering and Technology, Electrical Engineering, Electrical Circuits, Microcircuits, Signal Transduction, Cell Signaling, Signal Inhibition, Data Management, Data Visualization, Raster Plots, Membrane Potential, Depolarization
Topic: Neural dynamics and brain function (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Funding: University of Connecticut (Deligeorges Family Scholarship in Bioengineering)
Citations: not cited yet (Europe PMC); 72 references in the paper

Abstract

Acetylcholine (ACh) affects both the intrinsic properties of individual neurons and the oscillatory tendencies of cortical microcircuits by modulating the muscarinic-receptor gated m-current. ACh concentrations have historically been assumed to vary exclusively over long (supra-second) neuromodulatory timescales, conventionally simplified in silico as a set and constant modulatory tone. However, contemporary experimental studies show cortical ACh concentrations change over sub-second timescales associated with cognitive tasks including attention and sensorimotor coordination. More realistic models reflecting dynamic, sub-second fluctuations in cholinergic tone have yet to be computationally studied. Using a new implementation of a time-varying cholinergic signal in computational excitatory-inhibitory (E-I) spiking neuronal networks, we here delineate how the interaction between dynamic cholinergic modulation and network connectivity influences these systems’ oscillatory tendencies. Synchrony in networks with dominant inter-connectivity (strong E-to-I and I-to-E synapses) is largely unaffected by time-varying cholinergic modulation. In contrast, networks with dominant intra-connectivity (strong E-to-E and I-to-I synapses) desynchronize with increasing cholinergic tone in manners diverging from the predictions of analogous systems with constant ACh levels. The rate and mechanism of this desynchronization is highly sensitive to the modulation’s time course and the E-I connectivity strength. This suggests that traditional in silico simplifications of the temporal profile of cholinergic activity may obscure sub-second neuromodulatory effects, which may be particularly relevant to contemporary efforts to optimize neurostimulation therapies influencing cholinergic pathways.

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 5 matches between paragraphs and lines of code.

RichLabUConn/DynamicACh

License: GPL-3.0
State: the link answers, verified on 29 September 2026
Evidence: files inventoried
Commit: 722d1db6f26698e4d46076d362b8301a424e7b2b, 16 March 2026
Languages: Python (11)
Size: 16 files, 11 scripts
Software Heritage: not archived
Found in: “Data Availability”
Holds: README, license file
Not found: CITATION.cff, environment file, tests, continuous integration, documentation
Tools: Matplotlib (9 files), NumPy (6 files), seaborn (2 files)
Availability: 1 check, the latest on 29 September 2026: the link answers
  • 29 September 2026: the link answers
13 files

Zenodo 15641814

License: GPL-3.0
State: the link answers, verified on 29 September 2026
Evidence: files inventoried
Size: 1 file
Software Heritage: not checked
Found in: “Data Availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: Matplotlib (9 files), NumPy (6 files), seaborn (2 files)
Availability: 1 check, the latest on 29 September 2026: the link answers (HTTP 200)
  • 29 September 2026: the link answers (HTTP 200)
13 files

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;
  • 22 scripts, each with its path and the digest of its content;
  • 5 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

No dataset and no data link were found in the paper.

Data Availability

There are no primary data in the paper; all materials are available at https://github.com/RichLabUConn/DynamicACh and the code is archived on Zenodo (DOI: 10.5281/zenodo.15641814 (https://doi.org/10.5281/zenodo.15641814)).

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, 29 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 2 authors, 13 MeSH terms, 1 funder, 72 references.

Cite

This paper

Pandian, S., & Rich, S. (2026). Dynamic cholinergic signaling differentially desynchronizes cortical microcircuits dependent on modulation rate and network connectivity. PLoS computational biology, 22(4), e1013252. https://doi.org/10.1371/journal.pcbi.1013252

BibTeX

@article{pandian2026dynamic,
author = {Pandian, Sibi and Rich, Scott},
title = {{Dynamic cholinergic signaling differentially desynchronizes cortical microcircuits dependent on modulation rate and network connectivity}},
journal = {PLoS computational biology},
year = {2026},
month = apr,
volume = {22},
number = {4},
pages = {e1013252},
publisher = {PLOS},
issn = {1553-734X},
doi = {10.1371/journal.pcbi.1013252},
url = {https://doi.org/10.1371/journal.pcbi.1013252},
pmid = {41961884},
pmcid = {PMC13095133}
}

RIS

TY - JOUR
AU - Pandian, Sibi
AU - Rich, Scott
TI - Dynamic cholinergic signaling differentially desynchronizes cortical microcircuits dependent on modulation rate and network connectivity
T2 - PLoS computational biology
J2 - PLoS Comput Biol
PY - 2026
DA - 2026/04/10
VL - 22
IS - 4
SP - e1013252
SN - 1553-734X
PB - PLOS
DO - 10.1371/journal.pcbi.1013252
UR - https://doi.org/10.1371/journal.pcbi.1013252
LA - en
ER -

CSL-JSON

{
"id": "10.1371/journal.pcbi.1013252",
"type": "article-journal",
"title": "Dynamic cholinergic signaling differentially desynchronizes cortical microcircuits dependent on modulation rate and network connectivity",
"container-title": "PLoS computational biology",
"author": [
{
"family": "Pandian",
"given": "Sibi"
},
{
"family": "Rich",
"given": "Scott"
}
],
"container-title-short": "PLoS Comput Biol",
"volume": "22",
"issue": "4",
"page": "e1013252",
"DOI": "10.1371/journal.pcbi.1013252",
"PMID": "41961884",
"PMCID": "PMC13095133",
"ISSN": "1553-734X",
"publisher": "PLOS",
"URL": "https://doi.org/10.1371/journal.pcbi.1013252",
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
10
]
]
}
}

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.1073/pnas.2532072123 [code]
Spatially structured heterogeneity shapes large-scale cortical dynamics in a model of the human cortex.
Journal: Proceedings of the National Academy of Sciences of the United States of America
In common: Matplotlib, NumPy, cellular / molecular, 6 references
[2] doi:10.7554/elife.110795 [code]
REM sleep prefrontal high-frequency oscillation chains mediate distinct cortical - hippocampal reactivation patterns compared to NREM sleep.
Journal: eLife
In common: 7 references
[3] doi:10.1007/s11571-026-10522-3 [code]
Acetylcholine enhances deviance detection in Hodgkin-Huxley neuronal networks.
Journal: Cognitive neurodynamics
In common: computational modeling (no new data), 6 references
[4] doi:10.1038/s41467-026-72214-0 [code]
Auricular vagus nerve stimulation drives analgesia via an auricle-brain axis in a mouse model of neuropathic pain.
Journal: Nature communications
In common: Matplotlib, NumPy, 4 references
[5] doi:10.1371/journal.pcbi.1014391 [code]
Multi-stable oscillations in cortical networks with two classes of inhibition.
Journal: PLoS computational biology
In common: seaborn, Matplotlib, NumPy, 3 references
[6] doi:10.1371/journal.pcbi.1014460 [code]
Quantitative anatomy and biophysical modeling of ascending neuromodulatory systems in the developing rat neocortex.
Journal: PLoS computational biology
In common: Matplotlib, NumPy, 3 references
[7] doi:10.1126/sciadv.adv5652 [code]
The anterior cingulate cortex modulates pupil-linked arousal.
Journal: Science advances
In common: seaborn, Matplotlib, NumPy, 2 references
[8] doi:10.1371/journal.pcbi.1014022 [code]
Emergence of multifrequency activity in a laminar neural mass model.
Journal: PLoS computational biology
In common: Matplotlib, NumPy, computational modeling (no new data), 1 reference
[9] doi:10.1523/jneurosci.0987-25.2026 [code]
Cell-Type-Specific Synaptic Scaling Mechanisms Differentially Contribute to Associative Learning.
Journal: The Journal of neuroscience : the official journal of the Society for Neuroscience
In common: seaborn, Matplotlib, NumPy, cellular / molecular, 1 reference
[10] doi:10.1016/j.ebiom.2026.106375 [code]
Brainwaves under medication: revealing class-specific neural signatures of psychotropic medication from 24,000 EEGs.
Journal: EBioMedicine
In common: seaborn, Matplotlib, NumPy, 1 reference

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.