/*--------------------------------------------------------------
	TEMPLATE FILE FOR DEFINING RETICULAR NEURONS
	--------------------------------------------

	One compartment model and currents derived from:

	Destexhe, A., Contreras, D., Sejnowski, T.J. and Steriade, M.
	A model of spindle rhythmicity in the isolated thalamic reticular
	nucleus.  J. Neurophysiol. 72: 803-818, 1994.

	Destexhe, A., Contreras, D., Steriade, M., Sejnowski, T.J.,
	and Huguenard, J.R.  In vivo, in vitro and computational analysis of 
	dendritic calcium currents in thalamic reticular neurons.  
	Journal of Neuroscience 16: 169-185, 1996.

	Modifications:

	- passive parameters estimated from simplex
	- IT2: Q10=2.5, strong conductance for broad bursts
	- no IK[Ca], no ICAN
	- Ca++: simple decay only


	This model is described in detail in:

	Destexhe, A., Bal, T., McCormick, D.A. and Sejnowski, T.J.
	Ionic mechanisms underlying synchronized oscillations and propagating
	waves in a model of ferret thalamic slices. Journal of Neurophysiology
	76: 2049-2070, 1996.
	See also http://www.cnl.salk.edu/~alain , http://cns.fmed.ulaval.ca


	Alain Destexhe, Salk Institute and Laval University, 1995

--------------------------------------------------------------*/


print " "
print " << defining template for one-compartment sRE cell >> "
print " "


begintemplate sRE		// create a new template object
public soma, ampapost, gabaapost, PYlist, TClist, REgabaalist

objectvar ampapost, gabaapost, PYlist, TClist, REgabaalist

create soma[1]			// one-compartment of 14260 um2
soma {
  nseg = 1
  diam = 70
  L = 64.86
  cm=1
}

proc init() { local v_potassium, v_sodium

  v_potassium = -100		// potassium reversal potential 
  v_sodium = 50			// sodium reversal potential 

  soma {
	Ra = 100		// geometry 
	nseg = 1
	diam = 70
	L = 64.86

	insert pas		// leak current 
	e_pas = -90
	g_pas = 5e-5        //5e-5

	insert hh2		// Hogin-Huxley INa and IK 
	ek = v_potassium
	ena = v_sodium
	vtraub_hh2 = -55
	gnabar_hh2 = 0.2  //original value
	gkbar_hh2 = 0.02

	
	insert itrecustom 	// ret. IT current - custom channel
	proportion_custom = 0
	taubase_itrecustom = 85
	shift_itrecustom = 2
	qm_itrecustom = 2.5		// low q10
	qh_itrecustom = 2.5
	gcabar_itrecustom = proportion_custom * 0.003	// strong

	insert it2 		// reticular IT current - whole cell
	cai = 2.4e-4 
	cao = 2 
	eca = 120 
	shift_it2 = 2
	taubase_it2 = 85
	qm_it2 = 2.5		// low q10
	qh_it2 = 2.5
	gcabar_it2 = (1-proportion_custom) * 0.003	// strong
	//gcabar_it2 = 0.003	// strong - original

	insert cad		// calcium decay
	depth_cad = 1
	taur_cad = 5
	cainf_cad = 2.4e-4
	kt_cad = 0		// no pump

	PYlist = new List()
	TClist = new List()
	REgabaalist = new List()

	ampapost = new AMPA_S(0.5)
	gabaapost = new GABAa_S(0.5)
	
  }

  print " "
  print "<< sRE: passive, INa, IK, ITs, IAHP and Ca++ decay inserted >>"
  print " "

}
endtemplate sRE