History

Wiki » History » Version 6

Version 5 (Adrian Quintana, 27 Apr 2015 16:41) → Version 6/12 (Adrian Quintana, 27 Apr 2015 16:43)

Goldman-Hodgkin-Katz and Nernst formalisms in NeuroML2
======================================================

Sample [LEMS & NeuroML 2](https://github.com/OpenSourceBrain/ghk-nernst/tree/master/NeuroML2) files implementing a single compartment model, containing *HH* type Na<sup>+</sup>/K<sup>+</sup> channels, a Ca<sup>++</sup> channel and pool. The Calcium current through the channel can be calculated either through the [GHK flux equation](http://en.wikipedia.org/wiki/GHK_flux_equation), or using the [Nernst Equation](http://en.wikipedia.org/wiki/Nernst_equation) to approximate its reversal potential.

The same mechanisms are implemented in *NEURON* as a comparison. Notice that *NEURON* has built in support for calculating reversal potentials via the Nernst equation, which can be compared to our implementation written from scratch by running [Native NEURON](https://github.com/OpenSourceBrain/ghk-nernst/blob/master/NEURON/nernstnat_na_k_ca.py) , [from scratch](https://github.com/OpenSourceBrain/ghk-nernst/blob/master/NEURON/nernst_na_k_ca.py) ; see also [native Nernst modfile](https://github.com/OpenSourceBrain/ghk-nernst/blob/master/NEURON/cachan_nernst_native.mod) and [from scratch modfile](https://github.com/OpenSourceBrain/ghk-nernst/blob/master/NEURON/cachan_nernst.mod)

Running tests
-------------

The following tests can be run to compare the usage of GHK/Nernst from *NEURON\_/\_LEMS*:

git clone git@github.com:OpenSourceBrain/ghk-nernst.git
cd ghk-nernst/NEURON/
nrnivmodl
./ghk_na_k_ca.py
./nernst_na_k_ca.py
</pre>
<pre>
cd ../NeuroML2
jnml LEMS_ghk_na_k_ca.xml
jnml LEMS_nernst_na_k_ca.xml
</pre>
<pre>
cd ../
python compare.py

neuroConstruct
--------------

Recent versions of neuroConstruct support GHK, generating NeuroML2 and NEURON code accordingly. In order to use the GHK flux equation instead
of Ohm’s law for a particular mechanism, set an extra parameter GHK\_permeability (in m/s) using the **Edit Density Mechs** dialog.
![](nc_ghk.png)

Definitions
-----------

- From [Wikipedia](http://en.wikipedia.org/wiki/GHK_flux_equation)

![](http://mathurl.com/ngps7px.png)

- From Steuber et al DCN model:

{{latex(A

```
A
= exp(~~23.20764929 \* v / T) = exp \* v) / ))}} )
ical = perm \* m\*m \* h \* \*~~ (calo/1000) \* A) / (1 - A)
(z\^2 \* F\^2 \* (0.001) \* v) / (R \* T)


```

- From [GENESIS](http://www.genesis-sim.org/GENESIS/gum-tutorials/beeman/Hyperdoc/Manual-26.html#ss26.30)
\<pre\>
valency \* F
K = - - - - - - -
R \* (T + 273)

Cin \* exp(K \* Vm) - Cout
Ik = ~~p \* F \* K \* Vm~~ - - - - - - - - - - -
exp(K \* Vm) - 1

</pre>
(it is missing one valency factor in comparison to the others, check genesis source!)