Skip to content
Prev 317577 / 398506 Next

An extended Hodgkin-Huxley model that doesn't want to work.

Forgot Reply to All.
On 13-02-2013, at 23:30, Jannetta Steyn <jannetta at henning.org> wrote:

            
1. why are you suing simecol when only deSolve is necessary?

2. there are some errors in your model. The return list from function HH_soma does not correspond with the state variables.
 You return dCa2 but there is no state variable Ca2. ECa is in the initial state variable init but there is no dECa derivative in the return list of function HH_SOMA.  Finally you have set parameter CaI to 0 in the parms vector.
But that parameter is only used in calling function ECa with argument CaI, where you are now dividing by 0 and taking the logarithm of the result (which is Inf).

So change the return list of function HH_soma to

  list(c(dv,
         dCaTm, dCaTh,
         dCaSm,
         dNapm, dNaph,
         dhm,
         dKm,
         dKCam,
         # dCa2,    <==== Not needed not in init
         dAm, dAh))  

Change parms into (change CaI to 1; if that is a sensible value if for you to decide).

parms = c(gCaT=22.5, gCaS=60, gNap=4.38, gh=0.219,
        gK=1576.8, gKCa=251.85, gA=39.42, gL=0.105,
        ENap=50, Ca2=0.52,
        Eh=-20, EK=-80, EL=-55, EKCa=-80, EA=-80,
        C=1/12, I=10, F=0.418, TauCa=303, C0=0.5, CaI=1)

and change the initial state to (leaving out ECa)

init = c(v=-65, CaTm=0.52 , CaTh=0.52, CaSm=0.52,
       Napm=0.52, Naph=0.52, hm=0.52, Km=0.52,
       KCam=0.52, Am=0.52, Ah=0.52)#, ECa=-80);


Finally  you don't need to end R expressions with ; (only needed to join several expressions on a single line)

I uses library(deSolve) and got an interesting plot.

Berend