123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- import brian2 as br
- from brian2 import umetre, ufarad, cm, siemens, mV, msiemens, nS, ms
- # Hodgkin Huxley model from Brian2 documentation
- # The model
- area = 20000 * umetre ** 2
- hodgkin_huxley_params = {
- "Cm": 1 * ufarad * cm ** -2 * area,
- "gl": 5e-5 * siemens * cm ** -2 * area,
- "El": -65 * mV,
- "EK": -90 * mV,
- "ENa": 50 * mV,
- "g_na": 100 * msiemens * cm ** -2 * area,
- "g_kd": 30 * msiemens * cm ** -2 * area,
- "VT": -63 * mV,
- "E_i": -80 * mV
- }
- hodgkin_huxley_eqs_with_synaptic_conductance = br.Equations('''
- dv/dt = (gl*(El-v) - g_na*(m*m*m)*h*(v-ENa) - g_kd*(n*n*n*n)*(v-EK) + I - g_syn*(v-E_i))/Cm : volt
- dm/dt = 0.32*(mV**-1)*(13.*mV-v+VT)/
- (exp((13.*mV-v+VT)/(4.*mV))-1.)/ms*(1-m)-0.28*(mV**-1)*(v-VT-40.*mV)/
- (exp((v-VT-40.*mV)/(5.*mV))-1.)/ms*m : 1
- dn/dt = 0.032*(mV**-1)*(15.*mV-v+VT)/
- (exp((15.*mV-v+VT)/(5.*mV))-1.)/ms*(1.-n)-.5*exp((10.*mV-v+VT)/(40.*mV))/ms*n : 1
- dh/dt = 0.128*exp((17.*mV-v+VT)/(18.*mV))/ms*(1.-h)-4./(1+exp((40.*mV-v+VT)/(5.*mV)))/ms*h : 1
- I : amp
- g_syn: siemens
- ''')
- lif_interneuron_eqs = """
- dv/dt =1.0/tau* (-v + u_ext) :volt (unless refractory)
- u_ext : volt
- tau : second
- """
- lif_interneuron_params = {
- "v_threshold": -40 * mV,
- "v_reset": -60 * mV,
- "tau_refractory": 0.0 * ms,
- "u_ext_const": -50 * mV
- }
- lif_interneuron_options = {
- "threshold": "v>v_threshold",
- "reset": "v=v_reset",
- "refractory": "tau_refractory",
- 'method': 'euler'
- }
- delta_synapse_model = 'synaptic_strength: volt'
- delta_synapse_on_pre = 'v+=synaptic_strength'
- delta_synapse_param = {}
- exponential_synapse = """
- dg/dt = -g/tau_syn : siemens (clock-driven)
- g_syn_post = g :siemens (summed)
- synaptic_strength : siemens
- """
- exponential_synapse_on_pre = "g+=synaptic_strength"
- exponential_synapse_params = {
- "tau_syn": 2 * ms
- }
|