Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mousify mod files #18

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions mousify/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Simulation Models :: mousify
----------------------------

These hoc and mod files implement the mousify specific cell mechanism.


Versions
--------

2019.1 - First import after splitting of neurodamus and models
2021.11 - Start using aggregate neurodamus-models repo, drop common submodule


Common models
-------------

TLDR: Run `./fetch_common.bash` to init and update common.

Most Blue Brain models depend on a set of common mods, among themProbAMPANMDA and ProbGABAAB.
Previously the current repo would include them as a submodule. However, besides overly
complicating the deployment process, it could lead to situations of outdated versions of these files.

Since 2021.11 all BBP maintained models therefore drop submodules and implement a fetch_common.bash
script which will ensure that you have locally the latest common files.

Therefore, every time you wish to init or fetch updates for common, simply:

> `./fetch_common.bash`

1 change: 1 addition & 0 deletions mousify/hoc/AMPANMDAHelper.hoc
1 change: 1 addition & 0 deletions mousify/hoc/DetAMPANMDAHelper.hoc
1 change: 1 addition & 0 deletions mousify/hoc/DetGABAABHelper.hoc
1 change: 1 addition & 0 deletions mousify/hoc/GABAABHelper.hoc
1 change: 1 addition & 0 deletions mousify/hoc/GluSynapseHelper.hoc
40 changes: 40 additions & 0 deletions mousify/mod/CaDynamics.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
: Dynamics that track inside calcium concentration
: modified from Destexhe et al. 1994

NEURON {
SUFFIX CaDynamics
USEION ca READ ica WRITE cai
RANGE decay, gamma, minCai, depth
}

UNITS {
(mV) = (millivolt)
(mA) = (milliamp)
FARADAY = (faraday) (coulombs)
(molar) = (1/liter)
(mM) = (millimolar)
(um) = (micron)
}

PARAMETER {
gamma = 0.05 : percent of free calcium (not buffered)
decay = 80 (ms) : rate of removal of calcium
depth = 0.1 (um) : depth of shell
minCai = 1e-4 (mM)
}

ASSIGNED {ica (mA/cm2)}

INITIAL {
cai = minCai
}

STATE {
cai (mM)
}

BREAKPOINT { SOLVE states METHOD cnexp }

DERIVATIVE states {
cai' = -(10000)*(ica*gamma/(2*FARADAY*depth)) - (cai - minCai)/decay
}
82 changes: 82 additions & 0 deletions mousify/mod/Ca_HVA.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
: Reference: Reuveni, Friedman, Amitai, and Gutnick, J.Neurosci. 1993

NEURON {
SUFFIX Ca_HVA
USEION ca READ eca WRITE ica
RANGE gbar, g, ica
}

UNITS {
(S) = (siemens)
(mV) = (millivolt)
(mA) = (milliamp)
}

PARAMETER {
gbar = 0.00001 (S/cm2)
}

ASSIGNED {
v (mV)
eca (mV)
ica (mA/cm2)
g (S/cm2)
mInf
mTau
mAlpha
mBeta
hInf
hTau
hAlpha
hBeta
}

STATE {
m
h
}

BREAKPOINT {
SOLVE states METHOD cnexp
g = gbar*m*m*h
ica = g*(v-eca)
}

DERIVATIVE states {
rates()
m' = (mInf-m)/mTau
h' = (hInf-h)/hTau
}

INITIAL{
rates()
m = mInf
h = hInf
}

PROCEDURE rates(){
UNITSOFF
: if((v == -27) ){
: v = v+0.0001
: }
:mAlpha = (0.055*(-27-v))/(exp((-27-v)/3.8) - 1)
mAlpha = 0.055 * vtrap(-27 - v, 3.8)
mBeta = (0.94*exp((-75-v)/17))
mInf = mAlpha/(mAlpha + mBeta)
mTau = 1/(mAlpha + mBeta)
hAlpha = (0.000457*exp((-13-v)/50))
hBeta = (0.0065/(exp((-v-15)/28)+1))
hInf = hAlpha/(hAlpha + hBeta)
hTau = 1/(hAlpha + hBeta)
UNITSON
}

FUNCTION vtrap(x, y) { : Traps for 0 in denominator of rate equations
UNITSOFF
if (fabs(x / y) < 1e-6) {
vtrap = y * (1 - x / y / 2)
} else {
vtrap = x / (exp(x / y) - 1)
}
UNITSON
}
69 changes: 69 additions & 0 deletions mousify/mod/Ca_LVA.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
: Comment: LVA ca channel. Note: mtau is an approximation from the plots
: Reference: Avery and Johnston 1996, tau from Randall 1997
: Comment: shifted by -10 mv to correct for junction potential
: Comment: corrected rates using q10 = 2.3, target temperature 34, orginal 21

NEURON {
SUFFIX Ca_LVA
USEION ca READ eca WRITE ica
RANGE gbar, g, ica
}

UNITS {
(S) = (siemens)
(mV) = (millivolt)
(mA) = (milliamp)
}

PARAMETER {
gbar = 0.00001 (S/cm2)
}

ASSIGNED {
v (mV)
eca (mV)
ica (mA/cm2)
g (S/cm2)
celsius (degC)
mInf
mTau
hInf
hTau
}

STATE {
m
h
}

BREAKPOINT {
SOLVE states METHOD cnexp
g = gbar*m*m*h
ica = g*(v-eca)
}

DERIVATIVE states {
rates()
m' = (mInf-m)/mTau
h' = (hInf-h)/hTau
}

INITIAL{
rates()
m = mInf
h = hInf
}

PROCEDURE rates(){
LOCAL qt
qt = 2.3^((celsius-21)/10)

UNITSOFF
v = v + 10
mInf = 1.0000/(1+ exp((v - -30.000)/-6))
mTau = (5.0000 + 20.0000/(1+exp((v - -25.000)/5)))/qt
hInf = 1.0000/(1+ exp((v - -80.000)/6.4))
hTau = (20.0000 + 50.0000/(1+exp((v - -40.000)/7)))/qt
v = v - 10
UNITSON
}
1 change: 1 addition & 0 deletions mousify/mod/ConductanceSource.mod
1 change: 1 addition & 0 deletions mousify/mod/DetAMPANMDA.mod
1 change: 1 addition & 0 deletions mousify/mod/DetGABAAB.mod
1 change: 1 addition & 0 deletions mousify/mod/GluSynapse.mod
71 changes: 71 additions & 0 deletions mousify/mod/Ih.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
: Reference: Kole,Hallermann,and Stuart, J. Neurosci. 2006

NEURON {
SUFFIX Ih
NONSPECIFIC_CURRENT ihcn
RANGE gbar, g, ihcn
}

UNITS {
(S) = (siemens)
(mV) = (millivolt)
(mA) = (milliamp)
}

PARAMETER {
gbar = 0.00001 (S/cm2)
ehcn = -45.0 (mV)
}

ASSIGNED {
v (mV)
ihcn (mA/cm2)
g (S/cm2)
mInf
mTau
mAlpha
mBeta
}

STATE {
m
}

BREAKPOINT {
SOLVE states METHOD cnexp
g = gbar*m
ihcn = g*(v-ehcn)
}

DERIVATIVE states {
rates()
m' = (mInf-m)/mTau
}

INITIAL{
rates()
m = mInf
}

PROCEDURE rates(){
UNITSOFF
: if(v == -154.9){
: v = v + 0.0001
: }
:mAlpha = 0.001*6.43*(v+154.9)/(exp((v+154.9)/11.9)-1)
mAlpha = 0.001 * 6.43 * vtrap(v + 154.9, 11.9)
mBeta = 0.001*193*exp(v/33.1)
mInf = mAlpha/(mAlpha + mBeta)
mTau = 1/(mAlpha + mBeta)
UNITSON
}

FUNCTION vtrap(x, y) { : Traps for 0 in denominator of rate equations
UNITSOFF
if (fabs(x / y) < 1e-6) {
vtrap = y * (1 - x / y / 2)
} else {
vtrap = x / (exp(x / y) - 1)
}
UNITSON
}
59 changes: 59 additions & 0 deletions mousify/mod/Im_v2.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
: Based on Im model of Vervaeke et al. (2006)

NEURON {
SUFFIX Im_v2
USEION k READ ek WRITE ik
RANGE gbar, g, ik
}

UNITS {
(S) = (siemens)
(mV) = (millivolt)
(mA) = (milliamp)
}

PARAMETER {
gbar = 0.00001 (S/cm2)
}

ASSIGNED {
v (mV)
ek (mV)
ik (mA/cm2)
g (S/cm2)
celsius (degC)
mInf
mTau
mAlpha
mBeta
}

STATE {
m
}

BREAKPOINT {
SOLVE states METHOD cnexp
g = gbar * m
ik = g * (v - ek)
}

DERIVATIVE states {
rates()
m' = (mInf - m) / mTau
}

INITIAL{
rates()
m = mInf
}

PROCEDURE rates() {
LOCAL qt
qt = 2.3^((celsius-30)/10)
mAlpha = 0.007 * exp( (6 * 0.4 * (v - (-48))) / 26.12 )
mBeta = 0.007 * exp( (-6 * (1 - 0.4) * (v - (-48))) / 26.12 )

mInf = mAlpha / (mAlpha + mBeta)
mTau = (15 + 1 / (mAlpha + mBeta)) / qt
}
Loading
Loading