Non square IClamp

NMODL and the Channel Builder.
Post Reply
jlaville
Posts: 5
Joined: Tue Jul 12, 2005 8:41 pm
Location: Instituto de Fisiologia Celular, UNAM

Non square IClamp

Post by jlaville »

I want to make an Iclamp that is not really square but instead it follows a sigmoidal at time "del" until it reaches a steady current and then it follows the same sigmoidal inversely at time "del+dur". So far I can make the first sigmoidal but I can't join it with the downward sigmoidal. Here is the code:

COMMENT
Sigmoidal current
ENDCOMMENT

NEURON {
POINT_PROCESS IClampr
RANGE del,a,b,dur,amp,i
ELECTRODE_CURRENT i
}
UNITS {(nA)= (nanoamp)}

PARAMETER {
del=10 (ms)
a=1.5 (ms)
b=0.12 (ms)
dur=30 (ms) <0,1e9>
amp=-0.03 (nA)
}

ASSIGNED {i (nA)}

INITIAL {i=0}

BREAKPOINT {
: for (t<dur/2){
i=amp+(-amp/(1+exp((t-a)/b)))
: }
: for (t>dur/2){
i=amp/(1+exp((t-a)/b))
: }
}

I would also like to know where I can find a complete manual of MODL.
csh
Posts: 52
Joined: Mon Feb 06, 2006 12:45 pm
Location: University College London
Contact:

Post by csh »

Hi,
I want to make an Iclamp that is not really square but instead it follows a sigmoidal at time "del" until it reaches a steady current and then it follows the same sigmoidal inversely at time "del+dur". So far I can make the first sigmoidal but I can't join it with the downward sigmoidal.
Instead of creating a new point process, you can use an IClamp and "play" an amplitude vector into it:

Code: Select all

// Variable initialization
//------------------------
// A very simple cell:
create soma
access soma
insert pas
soma.e_pas=-65

// Size of the amplitude vector:
dt=0.025
tstop=100
size=tstop/dt

// the IClamp:
objectvar pulse, stim_vect
pulse = new IClamp(0.5)
pulse.del = 0
pulse.dur = 100
pulse.amp = 1e9

stim_vect=new Vector(size)

func sigm() {
// $1: t /*ms*/
// $2: duration (from delay) /*ms*/
// $3: amplitude /*nA*/	
// $4: delay /*ms*/
// $5: slope /*ms*/
	center=($4*2.0+$2)/2.0 
	if ($1<center) {
		return $3*(1.0-1.0/(1.0+exp(($1-$4)/$5)))
	} else {
		return $3/(1.0+exp(($1-($2+$4))/$5))
	} 
}

proc init_IClamp() {
// $1: delay /*ms*/
// $2: duration (from delay) /*ms*/
// $3: amplitude /*nA*/
	for i=0,size-1 {
		stim_vect.x[i]=sigm(i*dt,$2,$3,$1,1.0)
	}
	stim_vect.play(&pulse.amp,dt)
}

// initialize an IClamp with a 10 ms delay, lasting 20 ms and
// having 1 nA amplitude:
init_IClamp(10,20,1)
This is described here:
http://www.neuron.yale.edu/neuron/stati ... tml#IClamp
I would also like to know where I can find a complete manual of MODL.
You can either read the NEURON book, chapter 9, or follow any of the links given in this thread:
https://www.neuron.yale.edu/phpBB2/viewtopic.php?t=11

--
Christoph
Post Reply