This is a complete set of code required to run and analyse the
striatum model from Humphries, Wood and Gurney (2010) PLoS Comp Biol.
The code is freely available for study and modification.  Please
cite the original sources. For questions and assistance contact:
m.d.humphries@shef.ac.uk or drmdhumphries@gmail.com

************************************************************************

Top-level Files:

Experiment_RandomInput.m: the top-level function that runs the model
			  for the results in Fig 9 of the paper; this
			  contains a selection of frequently changed
			  parameters.  Extensions to the model should
			  be based on this file

Experiment_ImpactOnCentreMSN.m: the top-level function that runs the
			  model for the results in Fig 10 of the
			  paper; extended to include stimulation of a
			  sub-set of MSNs and FSIs residing a
			  specified spherical shell a set distance
			  from the selected target MSN. This needs to
			  load a 1mm3 network, with 1% FSIs, to run
			  the experiments. This 129MB file .mat is
			  available from:
http://www.abrg.group.shef.ac.uk/code/Striatum/Striatum_network_1000-1000-1000_num_1_at_734299.3923.mat

StriatumNetworkParameters.m: the complete specification of the model;
				a few of the parameters set here are
				overwritten in
				Experiment_RandomInput.m or
				Experiment_ImpactOnCentreMSN.m
				RunSimulation.m: function called by
				Experiment_RandomInput.m (or
				Experiment_ImpactOnCentreMSN.m) to
				handle passing the parameters to the
				MEX file that runs model simulation
				checkStriatumInputs.m: ensures that
				all parameters are of the right class
				and type for handing to the MEX
				function (called by RunSimulation.m)

./CreateNetwork (folder):
BuildStriatumNetwork.m: builds the network model according to the
			specified parameters (called by
			StriatumNetworkParameters.m); uses the
			probability of intersection functions supplied
			by the 4 .mat files in this folder
			GetNeuronPositions.m: puts all neurons in
			their 3D positions, ensuring that none are
			closer than the minimum set distance (called
			by BuildStriatumNetwork.m)

./Simulation (folder):
This contains the MEX files and source C code for the simulation
engines that run the model. The simulation uses the striatum_RK2 MEX
file, solving the ODEs using the midpoint method (aka 2nd order
Runge-Kutta).

The RK2 method MEX files are provided compiled for 32-bit (.mexw32)
and 64-bit (.mexw64) Windows, and for 64-bit (.mexa64) Linux
systems. We strongly recommend that you recompile the MEX code from
the source C++ for your platform

./Analyses (folder):
firing_stats_solo.m: analyses of the firing properties of a
simulation, including firing rate distributions analyse_centre_MSN.m:
impact of inputs on centre MSN raster_plot.m: helper function for the
analyses. Plots rasters of spike-train data.

**********************************************************************

Notes:

(1) This code represents version 1.5 of our striatal model: it
combines the new 3D connectivity model with the neuron and gap
junction models from version 1 (published in Humphries et al, 2009;
ModelDB ID:128874)

(2) This code does not include our updated model of dopamine's effects
on the MSN (Humphries, Lepora, Wood & Gurney, 2009b)



***********************************************************************
References:

Humphries, M. D., Wood, R. & Gurney, K. (2009) Dopamine-modulated
dynamic cell assemblies generated by the GABAergic striatal
microcircuit Neural Networks,22, 1174-1188.  Download at:
http://dx.doi.org/10.1016/j.neunet.2009.07.018

Humphries, M. D.; Lepora, N.; Wood, R. & Gurney, K. (2009b) Capturing
dopaminergic modulation and bimodal membrane behaviour of striatal
medium spiny neurons in accurate, reduced models. Frontiers in
Computational Neuroscience, 3, 26. Download at:
http://dx.doi.org/10.3389/neuro.10.026.2009

Humphries, M. D., Wood, R. & Gurney, K. (2010) Reconstructing the
three-dimensional GABAergic microcircuit of the striatum. PLoS
Computational Biology, 6, e100101. [PDF copy included]

