braincell.channel.ghk_flux#
- braincell.channel.ghk_flux(V, ci, co, z, temp)[source]#
Compute the Goldman-Hodgkin-Katz constant-field flux, per permeability.
Evaluates the constant-field (GHK) electrodiffusion equation for a single permeant ion species, returning the flux divided through by the membrane permeability. Channels in the catalogue that use GHK-style currents (calcium channels, most notably) multiply this result by their own
g_max, which occupies the permeability slotP_sthat a textbook GHK flux equation would otherwise carry explicitly.- Parameters:
V (ArrayLike) – Membrane potential, as a voltage (for example
u.mV).ci (ArrayLike) – Intracellular concentration of the permeant ion, as a molar concentration (for example
u.mM).co (ArrayLike) – Extracellular concentration of the permeant ion, as a molar concentration (for example
u.mM).z (ArrayLike) – Valence of the permeant ion. Dimensionless.
temp (ArrayLike) – Absolute temperature, as a temperature (for example
u.kelvin).
- Returns:
The constant-field flux, divided through by the permeability
P_sthat a caller is expected to supply separately (typically asg_max). Not yet a current or a conductance on its own.- Return type:
ArrayLike
Notes
Let
zeta = z * F * V / (R * T), withFthe Faraday constant andRthe gas constant. The function evaluates\[\text{regular\_branch} = \frac{z \zeta F (c_i - c_o e^{-\zeta})}{1 - e^{-\zeta}}\]which is undefined at
zeta = 0because1 - exp(-zeta)vanishes there and the branch divides by it. To keep the function stable aszeta -> 0, a second, algebraically equivalent branch\[\text{small\_branch} = z F (c_i - c_o e^{-\zeta}) \left(1 + \frac{\zeta}{2}\right)\]is selected instead via
u.math.wherewheneverabs(1 - exp(-zeta)) <= 1e-6, which both avoids the division and stays numerically well conditioned near that singularity.Goldman (1943) [1] and Hodgkin & Katz (1949) [2] are together the origin of the name “GHK”, but they are the primary sources for two different equations. This function computes the constant-field flux/current equation, whose primary source is Goldman (1943) – hence
.. [1]first. It does not compute the constant-field voltage equation, for which Hodgkin & Katz (1949) is the primary source.References