# HH#

class brainpy.dyn.HH(size, sharding=None, keep_size=False, mode=None, name=None, method='exp_auto', init_var=True, ENa=50.0, gNa=120.0, EK=-77.0, gK=36.0, EL=-54.387, gL=0.03, V_th=20.0, C=1.0, V_initializer=Uniform(min_val=-70, max_val=-60.0, rng=[2459466628 2755113083]), m_initializer=None, h_initializer=None, n_initializer=None, noise=None)[source]#

Hodgkin–Huxley neuron model.

Model Descriptions

The Hodgkin-Huxley (HH; Hodgkin & Huxley, 1952) model [1] for the generation of the nerve action potential is one of the most successful mathematical models of a complex biological process that has ever been formulated. The basic concepts expressed in the model have proved a valid approach to the study of bio-electrical activity from the most primitive single-celled organisms such as Paramecium, right through to the neurons within our own brains.

Mathematically, the model is given by,

\begin{align}\begin{aligned}C \frac {dV} {dt} = -(\bar{g}_{Na} m^3 h (V &-E_{Na}) + \bar{g}_K n^4 (V-E_K) + g_{leak} (V - E_{leak})) + I(t)\\\frac {dx} {dt} &= \alpha_x (1-x) - \beta_x, \quad x\in {\rm{\{m, h, n\}}}\\&\alpha_m(V) = \frac {0.1(V+40)}{1-\exp(\frac{-(V + 40)} {10})}\\&\beta_m(V) = 4.0 \exp(\frac{-(V + 65)} {18})\\&\alpha_h(V) = 0.07 \exp(\frac{-(V+65)}{20})\\&\beta_h(V) = \frac 1 {1 + \exp(\frac{-(V + 35)} {10})}\\&\alpha_n(V) = \frac {0.01(V+55)}{1-\exp(-(V+55)/10)}\\&\beta_n(V) = 0.125 \exp(\frac{-(V + 65)} {80})\end{aligned}\end{align}

References

Examples

Here is a simple usage example:

import brainpy as bp
import matplotlib.pyplot as plt

neu = bp.dyn.HH(1,)

inputs = bp.inputs.ramp_input(4, 40, 700, 100, 600, )

runner = bp.DSRunner(neu, monitors=['V'])
runner.run(inputs = inputs)

plt.plot(runner.mon['ts'], runner.mon['V'])
plt.plot(runner.mon.ts, inputs.value)       # show input current
plt.legend(['Membrane potential/mA', 'Input current/mA'], loc='upper right')

plt.tight_layout()
plt.show()


The illustrated example of HH neuron model please see this notebook.

Parameters:
• size (sequence of int, int) – The size of the neuron group.

• ENa (float, ArrayType, Initializer, callable) – The reversal potential of sodium. Default is 50 mV.

• gNa (float, ArrayType, Initializer, callable) – The maximum conductance of sodium channel. Default is 120 msiemens.

• EK (float, ArrayType, Initializer, callable) – The reversal potential of potassium. Default is -77 mV.

• gK (float, ArrayType, Initializer, callable) – The maximum conductance of potassium channel. Default is 36 msiemens.

• EL (float, ArrayType, Initializer, callable) – The reversal potential of learky channel. Default is -54.387 mV.

• gL (float, ArrayType, Initializer, callable) – The conductance of learky channel. Default is 0.03 msiemens.

• V_th (float, ArrayType, Initializer, callable) – The threshold of the membrane spike. Default is 20 mV.

• C (float, ArrayType, Initializer, callable) – The membrane capacitance. Default is 1 ufarad.

• V_initializer (ArrayType, Initializer, callable) – The initializer of membrane potential.

• m_initializer (ArrayType, Initializer, callable) – The initializer of m channel.

• h_initializer (ArrayType, Initializer, callable) – The initializer of h channel.

• n_initializer (ArrayType, Initializer, callable) – The initializer of n channel.

• method (str) – The numerical integration method.

• name (str) – The group name.

update(x=None)[source]#

The function to specify the updating rule.