# brainpy.neurons.WangBuzsakiModel#

class brainpy.neurons.WangBuzsakiModel(size, keep_size=False, ENa=55.0, gNa=35.0, EK=-90.0, gK=9.0, EL=-65, gL=0.1, V_th=20.0, phi=5.0, C=1.0, V_initializer=OneInit(value=-65.0), h_initializer=OneInit(value=0.6), n_initializer=OneInit(value=0.32), noise=None, method='exp_auto', input_var=True, name=None, mode=None)[source]#

Wang-Buzsaki model [9], an implementation of a modified Hodgkin-Huxley model.

Each model is described by a single compartment and obeys the current balance equation:

$C_{m} \frac{d V}{d t}=-I_{\mathrm{Na}}-I_{\mathrm{K}}-I_{\mathrm{L}}-I_{\mathrm{syn}}+I_{\mathrm{app}}$

where $$C_{m}=1 \mu \mathrm{F} / \mathrm{cm}^{2}$$ and $$I_{\mathrm{app}}$$ is the injected current (in $$\mu \mathrm{A} / \mathrm{cm}^{2}$$ ). The leak current $$I_{\mathrm{L}}=g_{\mathrm{L}}\left(V-E_{\mathrm{L}}\right)$$ has a conductance $$g_{\mathrm{L}}=0.1 \mathrm{mS} / \mathrm{cm}^{2}$$, so that the passive time constant $$\tau_{0}=C_{m} / g_{\mathrm{L}}=10 \mathrm{msec} ; E_{\mathrm{L}}=-65 \mathrm{mV}$$.

The spike-generating $$\mathrm{Na}^{+}$$ and $$\mathrm{K}^{+}$$ voltage-dependent ion currents $$\left(I_{\mathrm{Na}}\right.$$ and $$I_{\mathrm{K}}$$ ) are of the Hodgkin-Huxley type (Hodgkin and Huxley, 1952). The transient sodium current $$I_{\mathrm{Na}}=g_{\mathrm{Na}} m_{\infty}^{3} h\left(V-E_{\mathrm{Na}}\right)$$, where the activation variable $$m$$ is assumed fast and substituted by its steady-state function $$m_{\infty}=\alpha_{m} /\left(\alpha_{m}+\beta_{m}\right)$$ ; $$\alpha_{m}(V)=-0.1(V+35) /(\exp (-0.1(V+35))-1), \beta_{m}(V)=4 \exp (-(V+60) / 18)$$. The inactivation variable $$h$$ obeys a first-order kinetics:

$\frac{d h}{d t}=\phi\left(\alpha_{h}(1-h)-\beta_{h} h\right)$

where $$\alpha_{h}(V)=0.07 \exp (-(V+58) / 20)$$ and $$\beta_{h}(V)=1 /(\exp (-0.1(V+28)) +1) \cdot g_{\mathrm{Na}}=35 \mathrm{mS} / \mathrm{cm}^{2}$$ ; $$E_{\mathrm{Na}}=55 \mathrm{mV}, \phi=5 .$$

The delayed rectifier $$I_{\mathrm{K}}=g_{\mathrm{K}} n^{4}\left(V-E_{\mathrm{K}}\right)$$, where the activation variable $$n$$ obeys the following equation:

$\frac{d n}{d t}=\phi\left(\alpha_{n}(1-n)-\beta_{n} n\right)$

with $$\alpha_{n}(V)=-0.01(V+34) /(\exp (-0.1(V+34))-1)$$ and $$\beta_{n}(V)=0.125\exp (-(V+44) / 80)$$ ; $$g_{\mathrm{K}}=9 \mathrm{mS} / \mathrm{cm}^{2}$$, and $$E_{\mathrm{K}}=-90 \mathrm{mV}$$.

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.

• phi (float, ArrayType, Initializer, callable) – The temperature regulator constant.

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

• 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.

References

__init__(size, keep_size=False, ENa=55.0, gNa=35.0, EK=-90.0, gK=9.0, EL=-65, gL=0.1, V_th=20.0, phi=5.0, C=1.0, V_initializer=OneInit(value=-65.0), h_initializer=OneInit(value=0.6), n_initializer=OneInit(value=0.32), noise=None, method='exp_auto', input_var=True, name=None, mode=None)[source]#

Methods

 __init__(size[, keep_size, ENa, gNa, EK, ...]) clear_input() Function to clear inputs in the neuron group. cpu() Move all variable into the CPU device. cuda() Move all variables into the GPU device. dV(V, t, h, n, I_ext) dh(h, t, V) dn(n, t, V) get_batch_shape([batch_size]) get_delay_data(identifier, delay_step, *indices) Get delay data according to the provided delay steps. load_state_dict(state_dict[, warn, compatible]) Copy parameters and buffers from state_dict into this module and its descendants. load_states(filename[, verbose]) Load the model states. m_inf(V) nodes([method, level, include_self]) Collect all children nodes. register_delay(identifier, delay_step, ...) Register delay variable. register_implicit_nodes(*nodes[, node_cls]) register_implicit_vars(*variables[, var_cls]) reset(*args, **kwargs) Reset function which reset the whole variables in the model. reset_local_delays([nodes]) Reset local delay variables. reset_state([batch_size]) Reset function which reset the states in the model. save_states(filename[, variables]) Save the model states. state_dict() Returns a dictionary containing a whole state of the module. to(device) Moves all variables into the given device. tpu() Move all variables into the TPU device. train_vars([method, level, include_self]) The shortcut for retrieving all trainable variables. tree_flatten() Flattens the object as a PyTree. tree_unflatten(aux, dynamic_values) Unflatten the data to construct an object of this class. unique_name([name, type_]) Get the unique name for this object. update([x]) The function to specify the updating rule. update_local_delays([nodes]) Update local delay variables. vars([method, level, include_self, ...]) Collect all variables in this node and the children nodes.

Attributes

 derivative global_delay_data Global delay data, which stores the delay variables and corresponding delay targets. mode Mode of the model, which is useful to control the multiple behaviors of the model. name Name of the model. pass_shared varshape The shape of variables in the neuron group.