VClamp SEClamp delay

Using the graphical user interface to build and exercise models. Includes customizing the GUI by writing a little bit of hoc.
Post Reply
oren
Posts: 54
Joined: Fri Mar 22, 2013 1:03 am

VClamp SEClamp delay

Post by oren » Thu Jun 27, 2013 8:49 am

Is there a way to use VClamp with a delay? I need the voltage clamp to start in a certain time point, and then to stop.
Is it possible in the gui?

Thank You

Code: Select all

edit: I added "SEClamp" to the title for better search result 
Last edited by oren on Fri Jun 28, 2013 4:47 am, edited 1 time in total.

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

Re: VClamp delay

Post by ted » Thu Jun 27, 2013 12:06 pm

oren wrote:Is there a way to use VClamp with a delay?
First read
Use SEClamp instead of VClamp
in the Forum's "Hot tips" area
viewforum.php?f=28&start=50
I need the voltage clamp to start in a certain time point, and then to stop.
That's the SEClamp's dur1 parameter. See the Programmer's Reference.
Is it possible in the gui?
Use a PointProcessManager.
NEURONMainMenu / Tools / Managers / Point Manager
SelectPointProcess / SEClamp

oren
Posts: 54
Joined: Fri Mar 22, 2013 1:03 am

Re: VClamp delay

Post by oren » Thu Jun 27, 2013 12:48 pm

I am sorry, I did not understood, I need the SEClamp to be with delay, Not to start at t=0
is it possible?

In the program refference I get " Clamp is on at time 0, and off at time dur1+dur2+dur3" I want the clamp to stat on time=10ms not on time= 0

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

Re: VClamp delay

Post by ted » Fri Jun 28, 2013 2:21 pm

oren wrote:I am sorry, I did not understood, I need the SEClamp to be with delay, Not to start at t=0
Actually it was I who did not understand.

If an SEClamp exists, it is always on. However, an SEClamp is simply a voltage source, so if you increase its series resistance rs to 1e9 (megohms), the SEClamp will not affect the segment to which it is attached.

So what you need is a way to make the SEClamp's rs be 1e9 megohms at the start of a simulation, and change to something much lower (1 megohm, or better 0.001 megohm). This can be done with events.

Suppose you have an SEClamp that you called sec. If you include this code

Code: Select all

STARTSEC = 10 // or whatever you want
proc delaysec() {
  sec.rs = 1e9
  cvode.event($1, "sec.rs = 0.001")
}
objref fih
fih = new FInitializeHandler("delaysec(STARTSEC)")
in your program AFTER model setup is complete, but BEFORE run() is called, sec.rs will be 1e9 megohms at the start of each simulation, and it will drop to 0.001 megohms at the time specified by STARTSEC (10 ms in this example, but you can change that to anything you like). Be sure to read the Programmer's Reference entries about the FInitializeHandler class and the CVode class's event method.

Post Reply