Ca-activated K-current with dynamic [Ca]_i clamp

NMODL and the Channel Builder.
Post Reply
sgratiy
Posts: 41
Joined: Tue Mar 30, 2010 5:33 pm

Ca-activated K-current with dynamic [Ca]_i clamp

Post by sgratiy »

I need to insert the distributed mechanism for modeling the Ca-activated K-current; more precisely, I am interested in inserting the SK channels into membrane in order to model the medium afterhyperpolarization. In the Sec. 9.6 of the Neuron book I found a relevant example for specifying such a mechanism. However, in my case I am not going to model the [Ca] dynamics, rather, the transient time course of intracellular [Ca] should be an input to my model (presumably obtained from the experimental data). In other words, I just want to be able to set the dynamic concentration clamp. Could you please advice on what is the best way of specifying the predefined transient time course for the intracellular [Ca]? Also, any additional suggestions or references for instrumenting Ca-activated K-channels are welcome.

Thanks
ted
Site Admin
Posts: 5810
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Ca-activated K-current with dynamic [Ca]_i clamp

Post by ted »

If a section has at least one mechanism described by NMODL code that contains a USEION ca statement, AND it does not have a mechanism that WRITEs cai, you can simply assign values to cai with ordinary hoc statements or by using the Vector class's play method. That's probably the easiest way to drive cai with experimentally measured calcium transients.

If your goal is to force cai to follow a parameterized function of time, it would be better to implement a mechanism with NMODL that WRITEs cai, where the values of cai are generated by a FUNCTION block.
sgratiy
Posts: 41
Joined: Tue Mar 30, 2010 5:33 pm

Re: Ca-activated K-current with dynamic [Ca]_i clamp

Post by sgratiy »

Ted, thanks for a speedy response. Do I understand correctly that using Vector's play method is preferred when using the variable time step? Also, assuming that I only care about [Ca]_i in the soma and assuming that at each point in time the somatic [Ca]_i is uniform, is this the correct way of assigning the experimentally measured somatic transient stored in the 'cai_exp' vector? I presume the assignment should go just before the fadvance() procedure.

Code: Select all

proc advance() {	 		 

	soma {
		for (x) {cai_exp.play(&cai(x), tvec,1)
	}
	fadvance()
       ... // some other computations
}
ted
Site Admin
Posts: 5810
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Ca-activated K-current with dynamic [Ca]_i clamp

Post by ted »

sgratiy wrote:Do I understand correctly that using Vector's play method is preferred when using the variable time step?
No. Here is what I wrote:
If your goal is to force cai to follow a parameterized function of time, it would be better to implement a mechanism with NMODL that WRITEs cai, where the values of cai are generated by a FUNCTION block.
Forcing functions used in computational modeling are typically either experimentally recorded variables that were sampled at discrete times, or actual mathematical functions of time. Vector play is most convenient for the former, regardless of the integration method; with adaptive integration, it would be a good idea to use Vector play with interpolation (read
http://www.neuron.yale.edu/neuron/stati ... .html#play
especially with regard to the "continuous" argument), but interpolation treats the data stream as break points of a piecewise linear function. For an actual mathematical function of time, it is often best to implement the function with NMODL. This has the advantage of providing the exact value of the function at any particular time t, and, depending on the function, preserving continuity of derivatives, which are useful attributes when using adaptive integration. An example of a driving force specified by a function in NMODL is the zap function ("chirp" or swept-frequency sinusoid), which is discussed in this post
http://www.neuron.yale.edu/phpBB/viewto ... 2404#p9483
which also links to source code for a demonstration program
http://www.neuron.yale.edu/ftp/ted/neuron/izap.zip
Also, assuming that I only care about [Ca]_i in the soma and assuming that at each point in time the somatic [Ca]_i is uniform
There is no need to customize proc advance(). Suppose your (t_j, cai_j) values are contained in two Vectors called tcaivec and caivec, respectively, and soma has nseg = 1. All you have to do is
caivec.play(&soma.cai(0.5), tcaivec, 1)
after model setup. Now each time you execute
run()
soma.cai will follow the piecewise linear function defined by the sequence of (t_j, cai_j) values.

If soma has nseg>1, the statement would be
for (x,0) caivec.play(&soma.cai(x), tcaivec, 1)
which skips the nodes at 0 and 1. Recall that attempting to assign a value to a range variable at 0 or 1 results in assignment to the variable at the nearest internal node.

The only caveats, which I quote from the Programmer's Reference:
Note that if there are discontinuities in the function itself, then tvec should have adjacent elements with the same time value. As of version 6.2, when a value is greater than the range of the t vector, linear extrapolation of the last two points is used instead of a constant last value. If a constant outside the range is desired, make sure the last two points have the same y value and have different t values (if the last two values are at the same time, the constant average will be returned).
sgratiy
Posts: 41
Joined: Tue Mar 30, 2010 5:33 pm

Re: Ca-activated K-current with dynamic [Ca]_i clamp

Post by sgratiy »

Thanks Ted, your suggestions are very helpful. Now I understand how Vector's play method works.
Post Reply