//execute1("celltypes.element(\"Cell\")")

/* VSI Type Template  */
/* Created by Bob Calin-Jageman */

begintemplate VSIType
	/* public references for VSIType */
	public soma, ileak, ishunt, ishunt2, sthold, stholdnc, iunder, iundernc
	
	/* public sections and objectvars */
	create soma
	objectvar ileak, ishunt, sthold, stholdnc, iunder, iundernc

	proc init() {
		

		/* Basic Settings */
		soma.L =  5.6491
		soma.nseg = 1
		soma.cm = 3.2*11.28
		soma.v = -56
		
		/* leak object */
		soma {ileak = new leak(0.5)}
		ileak.vrest = -56
		ileak.r = 14

		/* shunt object */
		soma {ishunt = new shunt(0.5)}
		ishunt.G = 1
		ishunt.erev = -70
		ishunt.Bm = 30
		ishunt.Cm = -9
		ishunt.Tm = 10
		ishunt.Bh = 54
		ishunt.Ch = 4
		ishunt.Th = 600
		ishunt.vstart = -56


		/* thold object */
		soma {sthold = new thold(0.5)}
		sthold.steadystate = -38
		sthold.reset = 10
		sthold.decaytc = 10

		soma stholdnc = new NetCon(&v(0.5), sthold, 0, 0, 1)
		setpointer sthold.nc_thresh, stholdnc.threshold

		/* spike overshoot objects */
		soma {iunder = new tholdsyn(0.5)}
		soma iundernc = new NetCon(&v(0.5), iunder, 0, 0, 1)
	
		iunder.G1_weight = 0.54000002
		iunder.G2_weight = 0.0046
		iunder.G3_weight = 0
	
		iunder.G1_eRev = -80
		iunder.G2_eRev = -80
		iunder.G3_eRev = 0
	
		iunder.G1_opentc = 10
		iunder.G2_opentc = 1000
		iunder.G3_opentc = 1

		iunder.G1_closetc = 100
		iunder.G2_closetc = 2500
		iunder.G3_closetc = 1

	}

endtemplate VSIType