🧠 Hodgkin–Huxley Neuron
Conductance-Based Model · Na⁺ / K⁺ Channels · Action Potential · Gating Variables m, h, n
Conductance-Based Model · Na⁺ / K⁺ Channels · Action Potential · Gating Variables m, h, n
This simulation integrates the classic Hodgkin–Huxley equations, which describe how a nerve membrane generates an action potential. A single capacitive equation, C dV/dt = I - INa - IK - IL, is coupled to three gating variables m, h and n. The Na⁺ current scales as gNa m³h and the K⁺ current as gK n⁴, with voltage-dependent rate constants solved here by forward Euler at a 0.01 ms time step.
The Stimulus panel sets the injected current Iext (0–50 µA/cm²), the pulse start time, the pulse duration and the simulation window, while presets such as Single spike, Repetitive and Subthreshold load typical regimes. The chart plots membrane voltage above the m, h and n gating curves, and readouts report peak voltage, spike count and firing rate. Hodgkin and Huxley won the 1963 Nobel Prize for this work, which remains the foundation of computational neuroscience.
What does the Hodgkin–Huxley model describe?
It is a conductance-based model of how a neuron's membrane produces an action potential, or nerve impulse. It treats the membrane as a capacitor in parallel with voltage-gated sodium and potassium channels plus a passive leak, and tracks how the membrane voltage evolves over milliseconds when current is injected.
What are the gating variables m, h and n?
They are dimensionless probabilities between 0 and 1 that describe channel state. The variable m is sodium activation and h is sodium inactivation, so the Na⁺ conductance follows m³h; n is potassium activation, so the K⁺ conductance follows n⁴. Each one relaxes towards a voltage-dependent steady state at its own rate.
What do the controls on this page do?
The injected current slider sets the stimulus strength in µA/cm², while the pulse start and pulse duration sliders define when and how long the current is applied. The simulation window slider sets the total time shown, and the preset buttons jump to common firing regimes. Every change re-runs the solver instantly.
Below about 6.5 µA/cm² the small inrush of Na⁺ is outweighed by the K⁺ and leak currents, so the membrane charges slightly then drifts passively back to rest. Above threshold the positive feedback of sodium activation outpaces the outward currents, triggering the all-or-nothing upswing of the action potential.
After a spike the sodium inactivation gate h is closed and the potassium gate n is still open, holding the membrane hyperpolarised. During this absolute refractory phase a second spike cannot fire no matter how large the current, because the sodium channels are temporarily unavailable until h recovers.
When sodium channels open, the membrane potential is driven towards the sodium reversal potential ENa, set here to +50 mV. The rapid m³h sodium conductance pulls the voltage upward from the −65 mV resting level, producing the sharp positive overshoot before potassium repolarises the cell.
If the injected current is sustained and strong enough, the membrane is repeatedly pushed back above threshold after each spike. As the h gate recovers and the membrane depolarises again, another action potential fires, giving a train of spikes whose rate rises with the stimulus current.
It uses the original 1952 squid giant axon parameters at 6.3 °C, including gNa = 120, gK = 36 and gL = 0.3 mS/cm², with the published α and β rate functions. The dynamics are faithful, though forward Euler integration and the fixed temperature mean it is a teaching model rather than a fit to a specific mammalian neuron.
The four coupled differential equations for V, m, h and n are advanced with the forward Euler method using a small 0.01 ms time step. At each step the ionic currents are computed from the present voltage and gates, the derivatives are evaluated, and all four variables are updated before the next step.
The Hodgkin–Huxley framework is the template for nearly all biophysical neuron models and underpins how excitable cells, including cardiac muscle, are simulated. It is widely used to study drug effects on ion channels, epilepsy and arrhythmias, and it remains a standard teaching example of nonlinear dynamics and excitable systems.