Modifying cell capacitance (cm) via a mod file (also cai)
Posted: Mon Oct 25, 2021 3:34 pm
Hi developers,
I am trying to simulate an ultrasonic stimulation (US) of a neuron. There are several hypotheses what it would do some include modifications to the membrane's capacitance and an increase in internal Ca concentration. I would like to simulate this initially with a simple hh one section cell. So i wrote a .mod file:
The hoc code would read the stim from a CSV file stimulate using both an iclamp and the US stimulation:
Finally, I would read everything from python and see that cm is not changed at all :-(.
Thanks for reading!
Roy
I am trying to simulate an ultrasonic stimulation (US) of a neuron. There are several hypotheses what it would do some include modifications to the membrane's capacitance and an increase in internal Ca concentration. I would like to simulate this initially with a simple hh one section cell. So i wrote a .mod file:
Code: Select all
NEURON {
SUFFIX US_control
USEION ca READ eca WRITE cai
GLOBAL us_stim
}
UNITS {
(S) = (siemens)
(mV) = (millivolt)
(mA) = (milliamp)
}
PARAMETER {
gbar = 0.001 (S/cm2)
pressure_to_g = 0.001
rise_flg = 0
cm_rate = 0.1 :assuming 10 steps to get to half cycle
us_stim
}
INITIAL{
rise_flg = 1
}
ASSIGNED {
v (mV)
cm (uf/cm2)
dt (ms)
ica
eca
cai
}
BREAKPOINT {
UNITSOFF
ica = us_stim*pressure_to_g*gbar*(v-eca)
if(rise_flg == 0){
cm = cm - cm_rate
}
if(rise_flg == 1){
cm = cm + cm_rate
}
if(cm > 1.5){
rise_flg = 0
}
if(cm <= 0){
rise_flg = 1
cm = 0
}
UNITSON
}
Code: Select all
objref v_vec,stim_vec,cai_vec,ica_vec,t_vec,cm_vec,usstim_arr,st
proc readCSVMatrix(){localobj fin
fin = new File($s1)
fin.ropen()
$o2.scanf(fin)
fin.close()
}
dt = 0.00005
tstop = 100
create soma
access soma
proc init(){
diam = 1
L = 1
insert hh
insert US_control
us_stim = 0
st = new IClamp(0.5)
st.del = 10
st.dur = 50
st.amp = 1
timesteps = int(tstop/dt)
v_vec = new Vector(timesteps)
stim_vec = new Vector(timesteps)
cai_vec = new Vector(timesteps)
ica_vec = new Vector(timesteps)
t_vec = new Vector(timesteps)
usstim_arr = new Vector(timesteps)
cm_vec = new Vector(timesteps)
readCSVMatrix("US_wave.csv",usstim_arr)
}
proc simulate(){
counter = 0
finitialize()
while (t<(tstop-dt)){
us_stim = usstim_arr.x(counter)
stim_vec.x(counter) = st.i
v_vec.x(counter) = soma.v(0.5)
cai_vec.x(counter) = soma.cai(0.5)
ica_vec.x(counter) = soma.ica(0.5)
t_vec.x(counter) = t
cm_vec.x(counter) = cm
counter +=1
fadvance()
}
}
Code: Select all
cms = h.cm_vec.as_numpy()
Roy