This project replicates the intracellular current injection experiments from Bittner et al., 2015, Fig. 6a, demonstrating plateau potential initiation in CA1 pyramidal neurons through direct somatic stimulation.
“Although naturally occurring plateaus require coincident input from CA3 and EC3, we were able to induce plateau potential initiation through intracellular current injection (300 ms, ~600 pA, Fig. 6).”
This code simulates that condition by injecting current into a biophysically detailed model neuron and analyzing membrane potential responses at the soma, apical tuft, distal trunk, oblique, and basal dendrites.
simulator/ModelSimulator.py– defines the biophysical neuron model and current injection protocolmain.py- Entry point to run simulations using the neuron model with specified parameters.visualization.py- Contains code to visualize simulation results.
Use Python 3.9+ and install dependencies with:
pip install -r requirements.txtBefore running simulations, you need to compile NEURON's .mod files.
Navigate to the folder containing the .mod files:
cd simulator/model/density_mechsAnd run the nrnivmodl tool from NEURON.
If NEURON has trouble finding compiled mechanisms, consider copying them into the root folder and re-running nrnivmodl.
More information about NEURON: https://neuron.yale.edu/neuron
More information about working with .mod files: https://www.neuron.yale.edu/phpBB/viewtopic.php?t=3263
More information about compiling .mod files: https://nrn.readthedocs.io/en/latest/guide/faq.html#how-do-i-compile-mod-files
Edit and run main.py
The simulation output will be saved to out_dir
- Plots smoothed vs. raw somatic voltage (
gaussian_filter, σ=40)
plt.plot(t, v_segment, label='Vm')
plt.plot(t, v_smooth, label='smoothed Vm')Simultaneous voltage traces across:
- Soma
- Apical tuft (
dend5_0111111111111111111) - Distal trunk (
dend5_0111111111111111) - Oblique branch (
dend5_01111111100) - Basal dendrite (
dend2_01001)