Hi all,
I try to simulate classical HH neuron with original euqations from Hodgkin-Huxley article. Problem is that this want not work. I cannot get spike train during stimulation. Why?
my hoc code:
load_file("nrngui.hoc")
objectvar stim
create soma
access soma
soma{
nseg=1
L=18.8
diam=18.8
Ra=123
insert kd
insert nad
insert leak
ek=-77
ena=50
e_leak=-54.3
}
tstop=200
stim=new IClamp(0.5)
soma{
stim.del=100
stim.dur=100
stim.amp=0.1
}
My currents NMODL codes:
Potassium:
K+ current HOHU
NEURON{
SUFFIX kd
USEION k READ ek WRITE ik
RANGE gbar,g,i
}
ASSIGNED{
v (mV)
ek (mV)
ik (mA)
i (mA/cm2)
g (mmho)
}
UNITS{
(mV) = (millivolt)
(mA) = (milliamp)
(S) = (siemens)
}
PARAMETER{gbar=0.036 (S/cm2)}
BREAKPOINT{
SOLVE state METHOD cnexp
g=gbar*n^4
i=g*(v-ek)
ik=i
}
STATE {n}
INITIAL{
n=alpha(v)/(alpha(v)+beta(v))
}
DERIVATIVE state{
n'=alpha(v)*(1-n)-n*beta(v)
}
FUNCTION alpha(Vm (mV)) (/ms){
UNITSOFF
alpha=(0.01*(Vm+10))/(exp((Vm+10)/10)-1)
UNITSON
}
FUNCTION beta(Vm (mV)) (/ms){
UNITSOFF
beta=0.125*exp(Vm/80)
UNITSON
}
Sodium:
: Na+ current
NEURON{
SUFFIX nad
USEION na READ ena WRITE ina
RANGE gbar,g,i
}
UNITS{
(mV) = (millivolt)
(mA) = (milliamp)
(S) = (siemens)
}
ASSIGNED{
v (mV)
i (mA)
ina (mA/cm2)
ena (mV)
g (S/cm2)
}
PARAMETER{gbar=0.120 (S/cm2)}
STATE{m h}
BREAKPOINT{
SOLVE state METHOD cnexp
g=gbar*m*m*m*h
i=g*(v-ena)
ina=i
}
INITIAL{
m=alpham(v)/(alpham(v)+betam(v))
h=alphah(v)/(alphah(v)+betah(v))
}
DERIVATIVE state{
m'=alpham(v)*(1-m)-m*betam(v)
h'=alphah(v)*(1-h)-h*betah(v)
}
FUNCTION alpham(Vm (mV)) (/ms){
UNITSOFF
alpham=(0.1*(Vm+25))/(exp((Vm+25)/10)-1)
UNITSON
}
FUNCTION betam(Vm (mV)) (/ms){
UNITSOFF
betam=4*exp(Vm/18)
UNITSON
}
FUNCTION alphah(Vm (mV)) (/ms){
UNITSOFF
alphah=0.07*exp(Vm/20)
UNITSON
}
FUNCTION betah(Vm (mV)) (/ms){
UNITSOFF
betah=1/(exp((Vm+30)/10)+1)
UNITSON
}
Leak:
: Leak current
NEURON{
SUFFIX leak
NONSPECIFIC_CURRENT i
RANGE i,e,g
}
UNITS {
(S) = (siemens)
(mA) = (milliamp)
(mV) = (millivolt)
}
PARAMETER{
g=0.0003 (S/cm2)
}
ASSIGNED{
i (mA)
v (mV)
e (mV) : typically ~ -11
}
BREAKPOINT{
i=g*(v-e)
}
Where is the problem with this code?
Thank you your helping!
Kazmer
classical Hodgkin-Huxley neuron in NEURON
-
- Site Admin
- Posts: 6393
- Joined: Wed May 18, 2005 4:50 pm
- Location: Yale University School of Medicine
- Contact:
By "classical HH neuron with original equations" you mean literally the original equations,I try to simulate classical HH neuron with original euqations from Hodgkin-Huxley article.
which produced a model whose resting potential is 0 mV.
Suggestions for how to diagnose the problems you may encounter:
0. Start small and add complexities incrementally, testing at every step. It doesn't matter
how smart you are, how facile you may be with programming, or how hard you work--
frustration and debugging nightmares are guaranteed if you try to do it all in one pass.
1. Use modlunit to verify consistency of units. modlunit will also pick up many
programming errors.
2. Make sure that all ionic conductances have the desired properties. Plot the alphas
and betas as functions of membrane potential. Do "voltage clamp" experiments on a
single compartment model and plot the time course of m, h, n, gna, gk, ina, and ik.
Also make sure that leak current has the correct voltage dependence.
3. Use L'hospital's rule to avoid rate constant formulas that become indeterminate (0/0)
(alphan and alpham). Look at hh.mod for an example.
4. Why wait 100 ms before applying the stimulus? If you initialize the model to its steady
state, you only have to let it run for a few ms to verify stable baseline before applying
the stimulus.
5. If the stimulus is too small or too large, you won't get a spike. Start with a brief, very
small stimulus. Increase its amplitude until you get a single spike. Then increase its
duration and notice that you have to reduce the amplitude or the model will just spike
one time and then hang at a depolarized level.