This dir contains the code for 
simulations of circuits of MLIs (Maex & Gutkin 2017).

To reproduce the figures, the code can be run as follows.


Figure 4
> genesis Stell+dend_layer_hines_torus+gap_normGABA.g
Default circuit model.


Figure 5
> genesis Stell+dend_layer_hines_torus+gap_normGABA.g
For varying the strength of inhibition, change parameter
	weight_stellate_cell_stellate_cell_synapse
in Stell_layer_const.g
For varying the PF spike rate, change parameter
	parallel_fiber_firing_rate
in Stell_layer_const.g


Figure 7
> genesis Stell+dend_layer_hines_torus+gap_normGABA.g
but select the pulse-like stimulation protocol
in stimulus_stcgrid.g.
This simulation was run with half the default PF spike rate,
so set 	parallel_fiber_firing_rate = 5
in Stell_layer_const.g.


Figures 8 and 9
> genesis Stell+dend_layer_hines_torus+gap_normGABA.g
but comment out the selected beam
in stimulus_stcgrid.g.
To uncouple the circuit electrically, put
	gap_junction_conductance = 0
in Stell_layer_const.g.


Figure 2C
> genesis Stell+dend_layer_hines_torus+gap_normGABA.g
but uncomment the line
	// addmsg  /set_value /molecular_layer/Stellate[233]/soma   INJECT  z
then you can enter the sequence of commands
	> step 1.0 -t
	> setfield /set_value z -10e-12
	> step 0.5 -t
	> setfield /set_value z 0
	> step 0.5 -t
and make sure you output the Vm's of MLIs 233, 238 and 258 
in Stell_layer_ascii_hines.g.


Figure 2G
> genesis Stell+dend_layer_hines-VC-MLI449.g
This simulation should be run twice, first with the
GABAA channels, secondly without. The default current
from the second simulation should be subtracetd from the first,
to yield the GABAA current.


Figure 2E
> genesis Stell+dend_layer_hines-VC.g
Voltage and current clamp can be run with the same code,
except that the clamp current should not be injected into the
selected MLIS for current clamp (comment out these lines in VC.g).


Figure 6A,B
> genesis Stell+dend_layer_hines_torus+gap_normGABA.g
but first the connection kernels have to be varied in
Stell+dend_layer_setup_torus_normGABA.g.


Figure 6C
> genesis Stell+dend_layer_hines_torus+gap_normGABA.g
but in Stell_layer_const.g
	number_stcs_sagitt = 20 * 2
	parallel_fiber_firing_rate = 40
	weight_stellate_cell_stellate_cell_synapse =  {weight_stellate_cell_Purkinje_cell_synapse} * 80 
and in stimulus_stcgrid.c
  	addmsg /sine2 /rectangulargrating[28] PLUS output
  	addmsg /sine2 /rectangulargrating[68] PLUS output
  	addmsg /sine2 /rectangulargrating[108] PLUS output

Note:
Simulations for Figure 10 can be run from dir ../Stell+dend_layer_PC.
Those for Figure 2B and Table 1 from dir ../Stell+dend_cell. 



