Code: Select all
DERIVATIVE state_change
{
m' = (minf-m)/taum
h' = (hinf-h)/tauh
if(uPtr == NULL) {
gbar' = (alpha_g * uPtr) - (beta_g * gbar)
}
}
Thanks!
Code: Select all
DERIVATIVE state_change
{
m' = (minf-m)/taum
h' = (hinf-h)/tauh
if(uPtr == NULL) {
gbar' = (alpha_g * uPtr) - (beta_g * gbar)
}
}
Code: Select all
For each mod file
change gbar to gptr
change the corresponding setpointer statement in hoc accordingly
recompile the mod files
run a simulation to make sure you didn't break anything
Code: Select all
For each mod file
in the NEURON block insert the statements
RANGE gbar
GLOBAL plastic
in the PARAMETER block insert
plastic = 1 (1)
gbar = somevalue
where somevalue is whatever you want to be the default when plasticity is off
in the BREAKPOINT block change
ix = gptr * gating variables * driving force
to
if (plastic==1) {
gbar = gptr
}
ix = gbar * gating variables * driving force
If instead the BREAKPOINT block contained a
g = gptr * gating variables
statement, change it to
if (plastic==1) {
gbar = gptr
}
g = gbar * gating variables
recompile the mod files
run a simulation with plasticity enabled (the default condition) to make sure you didn't break anything
use a hoc statement to set plasticity_suffix = 0 (where suffix is this mechanism's SUFFIX)
and then run a simulation to verify that this mechanism's conductance is now constant
Code: Select all
DERIVATIVE state_change
{
m' = (minf-m)/taum
h' = (hinf-h)/tauh
gbar' = (alpha_g * uPtr) - (beta_g * gbar)
}
Code: Select all
DERIVATIVE state_change
{
m' = (minf-m)/taum
h' = (hinf-h)/tauh
if(plastic == 1) {
gbar' = (alpha_g * uPtr) - (beta_g * gbar)
}
}
and were posed in terms of the example in ModelDB to which you referred.sometimes I just want to run the code without this activity-dependent plasticity . . . The intended outcome is for gbar to not change over time
Seems OK as far as it goes, but you might want to be more explicit about what happens when plastic is not == 1.I want the plasticity time constant to be different for the same ion channel in different compartments. . . would it be acceptable to use . . .Code: Select all
DERIVATIVE state_change { m' = (minf-m)/taum h' = (hinf-h)/tauh gbar' = (alpha_g * uPtr) - (beta_g * gbar) }
Code: Select all
DERIVATIVE state_change { m' = (minf-m)/taum h' = (hinf-h)/tauh if(plastic == 1) { gbar' = (alpha_g * uPtr) - (beta_g * gbar) } }
Code: Select all
if(plastic == 1) {
gbar' = (alpha_g * uPtr) - (beta_g * gbar)
} else {
gbar' = 0
}
Code: Select all
gbar' = 0
Code: Select all
invalid storage class for function 'state_change'
Code: Select all
DERIVATIVE state_change
{
rates(v) : Calculate minf, taum, hinf, tauh
m' = (minf-m)/taum
h' = (hinf-h)/tauh
if( plastic==1 ){
gbar' = (alpha_g * uPtr) - (beta_g * gbar)
} else {
gbar' = 0
}
}
Code: Select all
DERIVATIVE state_change
{
rates(v) : Calculate minf, taum, hinf, tauh
m' = (minf-m)/taum
h' = (hinf-h)/tauh
if( plastic==1 ){
gbar' = (alpha_g * uPtr) - (beta_g * gbar)
}
}
Code: Select all
DERIVATIVE state_change
{
rates(v) : Calculate minf, taum, hinf, tauh
m' = (minf-m)/taum
h' = (hinf-h)/tauh
if( plastic==1 ){ }
gbar' = (alpha_g * uPtr) - (beta_g * gbar)
}
Code: Select all
BREAKPOINT
{
if(plastic==1) {
SOLVE plastic_state_change METHOD cnexp
} else {
SOLVE static_state_change METHOD cnexp
}
g = (gbar/surf_area)*m^3*h
i = (1e-4)*(g*(v-ek))
}
DERIVATIVE plastic_state_change
{
rates(v) : Calculate minf, taum, hinf, tauh
m' = (minf-m)/taum
h' = (hinf-h)/tauh
gbar' = (alpha_g * uPtr) - (beta_g * gbar)
}
DERIVATIVE static_state_change
{
rates(v) : Calculate minf, taum, hinf, tauh
m' = (minf-m)/taum
h' = (hinf-h)/tauh
}
Code: Select all
syntax error:
Illegal SOLVE statement:
Illegal expression:
Illegal statement:
Illegal block at line 82 in file Aa_AT.mod
SOLVE static_state_change METHOD cnexp
Code: Select all
DERIVATIVE states {
rates(v)
m' = (minf - m)/tau_m
}
Code: Select all
DERIVATIVE states {
rates(v)
if (fixed==0) {
m' = (minf - m)/tau_m
} else {
m' = 0
}
}
Code: Select all
FUNCTION dxdt(x, xinf, tau_x (ms))(/ms) {
if (fixed==0) {
dxdt = (xinf - x)/tau_x
} else {
dxdt = 0
}
}
DERIVATIVE states {
rates(v)
: m' = (minf - m)/tau_m
m' = dxdt(m, minf, tau_m)
}