Edit History

Wiki » History » Version 2

Boris Marin, 30 Apr 2014 14:58
Initial pasting from Readme & minor math tests

1 2 Boris Marin
Goldman-Hodgkin-Katz and Nernst formalisms in NeuroML2
2 2 Boris Marin
======================================================
3 1 Padraig Gleeson
4 2 Boris Marin
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.
5 2 Boris Marin
6 2 Boris Marin
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
7 2 Boris Marin
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)
8 2 Boris Marin
9 2 Boris Marin
Running tests
10 2 Boris Marin
-------------
11 2 Boris Marin
12 2 Boris Marin
The following tests can be run to compare the usage of GHK/Nernst from *NEURON\_/\_LEMS*:
13 2 Boris Marin
14 2 Boris Marin
     git clone git@github.com:OpenSourceBrain/ghk-nernst.git
15 2 Boris Marin
     cd ghk-nernst/NEURON/
16 2 Boris Marin
     nrnivmodl
17 2 Boris Marin
     ./ghk_na_k_ca.py
18 2 Boris Marin
     ./nernst_na_k_ca.py
19 2 Boris Marin
    </pre>
20 2 Boris Marin
    <pre>
21 2 Boris Marin
     cd ../NeuroML2
22 2 Boris Marin
     jnml LEMS_ghk_na_k_ca.xml
23 2 Boris Marin
     jnml LEMS_nernst_na_k_ca.xml
24 2 Boris Marin
    </pre>
25 2 Boris Marin
    <pre>
26 2 Boris Marin
     cd ../
27 2 Boris Marin
     python compare.py
28 2 Boris Marin
29 2 Boris Marin
neuroConstruct
30 2 Boris Marin
--------------
31 2 Boris Marin
32 2 Boris Marin
Recent versions of neuroConstruct support GHK, generating NeuroML2 and NEURON code accordingly. In order to use the GHK flux equation instead
33 2 Boris Marin
of Ohm’s law for a particular mechanism, set an extra parameter GHK\_permeability (in m/s) using the **Edit Density Mechs** dialog.
34 2 Boris Marin
![](nc_ghk.png)
35 2 Boris Marin
36 2 Boris Marin
Definitions
37 2 Boris Marin
-----------
38 2 Boris Marin
39 2 Boris Marin
-   From [Wikipedia](http://en.wikipedia.org/wiki/GHK_flux_equation)
40 2 Boris Marin
41 2 Boris Marin
![](http://mathurl.com/ngps7px.png)
42 2 Boris Marin
43 2 Boris Marin
-   From Steuber et al DCN model:
44 2 Boris Marin
    \<pre\>
45 2 Boris Marin
     A = exp(~~23.20764929 \* v / T) = exp \* v) / )
46 2 Boris Marin
     ical = perm \* m\*m \* h \* \*~~ (calo/1000) \* A) / (1 - A)
47 2 Boris Marin
     (z\^2 \* F\^2 \* (0.001) \* v) / (R \* T)
48 2 Boris Marin
    \</pre\>
49 2 Boris Marin
50 2 Boris Marin
-   From [GENESIS](http://www.genesis-sim.org/GENESIS/gum-tutorials/beeman/Hyperdoc/Manual-26.html#ss26.30)
51 2 Boris Marin
    \<pre\>
52 2 Boris Marin
     valency \* F
53 2 Boris Marin
     K = - - - - - - -
54 2 Boris Marin
     R \* (T + 273)
55 2 Boris Marin
56 2 Boris Marin
Cin \* exp(K \* Vm) - Cout
57 2 Boris Marin
 Ik = ~~p \* F \* K \* Vm~~ - - - - - - - - - - -
58 2 Boris Marin
 exp(K \* Vm) - 1
59 2 Boris Marin
60 2 Boris Marin
</pre>
61 2 Boris Marin
(it is missing one valency factor in comparison to the others, check genesis source!)