Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
arbor
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
arbor-sim
arbor
Commits
dbea3c0a
Unverified
Commit
dbea3c0a
authored
4 years ago
by
thorstenhater
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add optimised HH model. (#1042)
* Replace HH model with optimised version.
parent
ea5348c9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mechanisms/mod/hh.mod
+38
-41
38 additions, 41 deletions
mechanisms/mod/hh.mod
with
38 additions
and
41 deletions
mechanisms/mod/hh.mod
+
38
−
41
View file @
dbea3c0a
...
...
@@ -3,8 +3,7 @@ NEURON {
USEION na READ ena WRITE ina
USEION k READ ek WRITE ik
NONSPECIFIC_CURRENT il
RANGE gnabar, gkbar, gl, el, gna, gk
GLOBAL minf, hinf, ninf, mtau, htau, ntau
RANGE gnabar, gkbar, gl, el
}
UNITS {
...
...
@@ -26,70 +25,68 @@ STATE {
ASSIGNED {
v (mV)
gna (S/cm2)
gk (S/cm2)
minf
hinf
ninf
mtau (ms)
htau (ms)
ntau (ms)
q10
}
BREAKPOINT {
SOLVE states METHOD cnexp
gna = gnabar*m*m*m*h
LOCAL gna, gk, n2, n_, m_
n_ = n
n2 = n_*n_
m_ = m
gna = gnabar*m_*m_*m_*h
ina = gna*(v - ena)
gk = gkbar*n
*n*n
*n
gk = gkbar*n
2
*n
2
ik = gk*(v - ek)
il = gl*(v - el)
}
INITIAL {
q10 = 3^((celsius - 6.3)/10)
rates(v)
m = minf
h = hinf
n = ninf
}
q10 = 3^((celsius - 6.3)*0.1)
DERIVATIVE states {
rates(v)
m' = (minf-m)/mtau
h' = (hinf-h)/htau
n' = (ninf-n)/ntau
LOCAL alpha, beta
:"m" sodium activation system
alpha = exprelr(-(v+40)*0.1)
beta = 4 * exp(-(v+65)*0.05555555555555555)
m = alpha/(alpha + beta)
:"h" sodium inactivation system
alpha = .07 * exp(-(v+65)*0.05)
beta = 1 / (exp(-(v+35)*0.1) + 1)
h = alpha/(alpha + beta)
:"n" potassium activation system
alpha = .1*exprelr(-(v+55)*0.1)
beta = .125*exp(-(v+65)*0.0125)
n = alpha/(alpha + beta)
}
PROCEDURE rates(v)
{
LOCAL alpha, beta, sum
DERIVATIVE states {
LOCAL alpha, beta, sum, minf, ninf, hinf, mrate, nrate, hrate
:"m" sodium activation system
alpha =
.1 * vtrap
(-(v+40)
,10
)
beta = 4 * exp(-(v+65)
/18
)
alpha =
exprelr
(-(v+40)
*0.1
)
beta = 4 * exp(-(v+65)
*0.05555555555555555
)
sum = alpha + beta
m
tau = 1/(
q10*sum
)
m
rate =
q10*sum
minf = alpha/sum
:"h" sodium inactivation system
alpha = .07 * exp(-(v+65)
/20
)
beta = 1 / (exp(-(v+35)
/10
) + 1)
alpha = .07 * exp(-(v+65)
*0.05
)
beta = 1 / (exp(-(v+35)
*0.1
) + 1)
sum = alpha + beta
h
tau = 1/(
q10*sum
)
h
rate =
q10*sum
hinf = alpha/sum
:"n" potassium activation system
alpha = .
0
1*
vtrap
(-(v+55)
,10
)
beta = .125*exp(-(v+65)
/80
)
alpha = .1*
exprelr
(-(v+55)
*0.1
)
beta = .125*exp(-(v+65)
*0.0125
)
sum = alpha + beta
n
tau = 1/(
q10*sum
)
n
rate =
q10*sum
ninf = alpha/sum
}
FUNCTION vtrap(x,y) {
: use built in exprelr(z) = z/(exp(z)-1), which handles the z=0 case correctly
vtrap = y*exprelr(x/y)
m' = (minf-m)*mrate
h' = (hinf-h)*hrate
n' = (ninf-n)*nrate
}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment