Coder Social home page Coder Social logo

ghk-nernst's Introduction

GHK & Nernst examples

Build Status

Sample LEMS & NeuroML 2 files implementing a single compartment model, containg HH type Na+/K+ channels, a Ca++ channel and pool. The Calcium current through the channel can be calculated either through the GHK flux equation, or using Ohm's law + 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, from scratch; see also native Nernst modfile and from scratch modfile

Running tests

The following tests can be run to compare the usage of GHK/Nernst from NEURON/LEMS:

git clone [email protected]:OpenSourceBrain/ghk-nernst.git
cd ghk-nernst/NEURON/
nrnivmodl
./ghk_na_k_ca.py
./nernst_na_k_ca.py

cd ../NeuroML2
jnml LEMS_ghk_na_k_ca.xml
jnml LEMS_nernst_na_k_ca.xml

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

Definitions

From Wikipedia

                                         concInt -  concExt * exp(-z * V * F /(R * T))                        
 Idensity = P * z^2 * V * F^2/(R * T)  - - - - - - - - - - - - - - - - - - - - - - - - - -                    
                                                 1 - exp(-z * V * F /(R * T))                                 

From Steuber et al DCN model:

 A = exp(-23.20764929 * v / T) = exp((-z * F * (0.001) * v) / (R * T))                                        

 ical = perm * m*m * h * (4.47814e6 * v / T) * ((cali/1000) - (calo/1000) * A) / (1 - A)                      

 (z^2 * F^2 * (0.001) * v) / (R * T)                                                                          

From GENESIS

          valency * F                                                                                          
 K     =  - - - - - - -                                                                                        
          R * (T + 273)                                                                                        

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

 (it is  missing one valency factor in comparison to the others, check genesis source)

ghk-nernst's People

Contributors

andrisecker avatar borismarin avatar pgleeson avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.