Modifying cell capacitance (cm) via a mod file (also cai)

NMODL and the Channel Builder.
Post Reply
roybens
Posts: 54
Joined: Fri Mar 14, 2008 7:57 am

Modifying cell capacitance (cm) via a mod file (also cai)

Post by roybens »

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:

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
}
The hoc code would read the stim from a CSV file stimulate using both an iclamp and the US stimulation:

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()
	}
}
Finally, I would read everything from python and see that cm is not changed at all :-(.

Code: Select all

cms = h.cm_vec.as_numpy()
Thanks for reading!
Roy
ted
Site Admin
Posts: 6287
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Modifying cell capacitance (cm) via a mod file (also cai)

Post by ted »

Interesting problem. Regarding varying membrane capacitance:

First see viewtopic.php?p=15854#p15854and the reply by Michael Hines. Then check out this entry in GitHub https://github.com/nrnhines/dcmdt.

Finally, it might be useful to examine modeldb.yale.edu/264539 and the corresponding article https://pubmed.ncbi.nlm.nih.gov/30952150/ by Lemaire et al. 2019
roybens
Posts: 54
Joined: Fri Mar 14, 2008 7:57 am

Re: Modifying cell capacitance (cm) via a mod file (also cai)

Post by roybens »

Thank you!
Those are very helpful. I will look into them and report back.
Best,
Roy
Post Reply