//genesis  - Purkinje cell M9 genesis2.1 script
/* Copyright E. De Schutter (Caltech and BBF-UIA) */

/* This file defines important simulation parameters, including gmax
** and Ek for all channels.  Everything uses SI units. */

int include_purk_const

if ( {include_purk_const} == 0 )

	include_purk_const = 1


echo Using Purkinje 2M9 preferences. Crank Nicholson method.
/* variables controlling hsolve integration */
float dt = 2.0e-5

 int tab_xdivs = 149; int tab_xfills = 2999
// int tab_xdivs = 299; int tab_xfills = {tab_xdivs}

/* The model is quite sensitive to these values in NO_INTERP (caclmode=0) */
float tab_xmin = -0.10; float tab_xmax = 0.05; float Ca_tab_max = 0.300
// only used for proto channels
float GNa = 1, GCa = 1, GK = 1, Gh = 1
/* cable parameters */
float CM = 0.0164 		// *9 relative to passive
float RMs = 1.000 		// /3.7 relative to passive comp
float RMd = 3.0
float RA = 2.50
/* preset constants */
float ELEAK = -0.0800 		// Ek value used for the leak conductance
float EREST_ACT = -0.068 // -0.08 // -0.0680 	// Vm value used for the RESET
/* concentrations */
float CCaO = 2.4000 		//external Ca as in normal slice Ringer
float CCaI = 0.000040		//internal Ca in mM
//diameter of Ca_shells
float Shell_thick = 0.20e-6
float CaTau = 0.0001 // 0.00010	 	// Ca_concen tau
/* Currents: Reversal potentials in V and max conductances S/m^2 */
/* Codes: s=soma, m=main dendrite, t=thick dendrite, d=spiny dendrite */
float ENa = 0.045
float GNaFs = 75000 // 90000 // 75000 // 70000 // 75000 // 80000 // 120000 // 120000 // 90000 //  80000 // 80000 // 75000 // 70000 // 75000 // 80000 // 75000 // 75000 // 70000 // 75000.0 // 75000.0 // 75000.0
float GNaPs = 0 // 12.0 // 10.0
float ECa = 0.0125*{log {CCaO/CCaI}} // 0.135 V
float GCaTs = 0 // 5.0 // 0 // 5.00 
float GCaTm = 5.00 * 1.0
float GCaTt = 5.00 * 1.0
float GCaTd = 5.00 * 1.0
float GCaPm = 45.0 * 1.4 // 1.0 // 1.4 // 1.8 // 2 // 1.6 // 1.4
float GCaPt = 45.0 * 1.4 // 1.0 // 1.4 // 1.8 // 2 // 1.6 // 1.4
float GCaPd = 45.0 * 1.4 // 1.2 // 1.4 // 1.8 // 2 // 1.6 // 1.4
float EK = -0.085
float GKAs = 150.0 // * 0.8
float GKAm = 20.0 // * 0.8
float GKdrs = 6000.0 * 2 // 1.5 //  2
float GKdrm = 600.0 * 2
float GKMs = 0.4 // 0 // 0.400 
float GKMm = 0.1 // 0 // 0.100 
float GKMt = 0.13 // 0 // 0.130 
float GKMd = 0.13 // 0 // 0.130 
float GKCm = 800.0 * 1.2 // 1.2 // 3 // 0 // 4.8 // 3 // 1.2 // 3 // 1.8 // 2.4 // 1.8 // 0.6 // 1.2 // 0.9 // 1.2 // * 0.6 // 1.2 
float GKCt = 800.0 * 1.2 // 1.2 // 3 // 0 // 4.8 // 3 // 1.2 // 3 // 1.8 // 2.4 // 1.8 // 0.6 // 1.2 // 0.9 // 1.2 // * 0.6 // 1.2
float GKCd = 800.0 * 1.2 // 1.2 // 3 // 0 // 4.8 // 3 // 1.2 // 3 // 1.8 // 2.4 // 1.8 // 0.6 // 1.2 // 0.9 // 1.2 // 0.6 // 1.2
float GK2m =  3.90 * 1.0 // 2 // 1.5 // 1.2 // 1.0
float GK2t =  3.90 * 1.0 // 2 // 1.5 // 1.2 // 1.0
float GK2d =  3.90 * 1.0 // 2 // 1.5 // 1.2 // 1.0
float Eh = -0.030
float Ghs = 0 // 3.00
float Eh_HR = -34.4e-3
float Gh_HR = 0.25 // * 3 // 1 // 0 // 2.0 // 0.25 // 1.0 // 0.5 // 0 // 0.25 // 0 // 0.25 // 0 // 0.25


// axonal conductances, from Granule cell model and axon-junction paper
float scaling_f = 314.15 / 2012.67 // surface soma over surface full Gabbiani model,
// scaling needed because active channels only on soma in Gabbiani model

float GInNaa = 2.5       \  //   correction for 10 mV shift of (in-)activation rates
             * 2         \  //   correction for 37 deg. Celsius
             * scaling_f \  //   conversion to single compartment
             * 10        \  //   conversion to SI units (S/m^2)
             * 70           //   the Gabbiani value
float GKDra   = 1.5  * 2 * scaling_f * 10 * 19 


/* synapses: */
float E_GABA = -0.080
//float G_GABA = 70.0/dt
float G_GABA = 70.0
//float GB_GABA = 20.0/dt
float GB_GABA = 20.0
float GB_GABAs = 20.0
float G_GABAm, G_GABAs
float E_non_NMDA = 0.000
//float G_par_syn = 750.0/dt
float G_par_syn = 750.0
//float G_cli_syn = 150.0/dt
float G_cli_syn = 150.0


end