# MLI Circuit Model - Cerebellar Interneuron Network Simulation

## Overview

This repository contains GENESIS simulation code for a circuit model of stellate and basket cells (molecular layer interneurons, MLIs) in the cerebellar cortex. The model demonstrates how inhibitory interneuron circuits interconnected via electrical and chemical (GABAA receptor) synapses can act as temporal integrators with integration times up to 1.5 seconds.

## Associated Publication

**Maex, R., & Gutkin, B. (2017).** "Temporal integration and 1/f power scaling in a circuit model of cerebellar interneurons." *Journal of Neurophysiology*.

### Key Findings

- Inhibitory interneuron circuits can produce slow response components with integration times exceeding 1 second
- Integration time scales with:
  - Strength of inhibition (vanishes when inhibition is blocked)
  - Average connection distance (determines balance between lateral and self-inhibition)
- Electrical synapses enhance integration time by:
  - Limiting heterogeneity among interneurons
  - Introducing a slow capacitive current
- Interneuron spike trains display ~1/f power scaling at low frequencies
- The circuit acts as a temporal integrator, building very short-term memory

## Model Description

The model implements a network of molecular layer interneurons (stellate and basket cells) with:
- Active soma (voltage-gated ion channels)
- Passive 21-compartment dendrite
- Electrical coupling (gap junctions)
- GABAA receptor synapses
- Parallel fiber inputs (from granule cells)

The model is based on predictions from Cannon, Robinson and Shamma (Biological Cybernetics, 1983) regarding inhibitory circuit dynamics.

## Requirements

- **GENESIS 2.2** or later (GEneral NEural SImulation System)
- UNIX/Linux environment with shell commands: `sort`, `touch`

## Repository Structure

### `Purkinje_cell/`
Contains a tutorial simulation of a cerebellar Purkinje cell, modeled by Erik de Schutter. This provides background on Purkinje cell properties and synaptic inputs. The tutorial is interactive and provides visual insight into how concentrations and channel conductances vary within a Purkinje cell.

**To run the tutorial:**
```bash
cd Purkinje_cell
./TUTORIAL
```
See [Purkinje_cell/README](/226396?tab=2&file=MLI-circuit-model_clean/Purkinje_cell/README) for detailed instructions.

### `Stell+dend_cell/`
Contains code for simulations of **isolated MLIs** (single-cell simulations). Used to generate voltage-clamp and current-clamp data for characterizing individual MLI properties.

**Key simulations:**
- **Figure 2E** (paper): `genesis TEST_dend3D30corr-CC-GABA.g`
- **Table 1** (paper): Various voltage-clamp and current-clamp simulations
  - GABA voltage clamp: `genesis TEST_dend3D30corr-VC-GABA.g`
  - AMPA voltage clamp: `genesis TEST_dend3D30corr-VC-AMPA.g`
  - GABA current clamp: `genesis TEST_dend3D30corr-CC-GABA.g`
  - AMPA current clamp: `genesis TEST_dend3D30corr-CC-AMPA-NaF0.g`

**Note:** The MLI model is based on a Golgi cell model with an added CaT channel (code located in `../Purkinje_cell/`).

See [Stell+dend_cell/README](/226396?tab=2&file=MLI-circuit-model_clean/Stell%2Bdend_cell/README) for details.

### `Stell+dend_layer_jn/`
Contains code for simulations of **MLI circuits** (network simulations). This is the main directory for reproducing most figures in the paper.

**Key simulations:**

- **Figure 4** (default circuit model):
  ```bash
  genesis Stell+dend_layer_hines_torus+gap_normGABA.g
  ```

- **Figure 5** (varying inhibition strength and PF spike rate):
  ```bash
  genesis Stell+dend_layer_hines_torus+gap_normGABA.g
  ```
  Modify parameters in `Stell_layer_const.g`:
  - `weight_stellate_cell_stellate_cell_synapse` for inhibition strength
  - `parallel_fiber_firing_rate` for PF spike rate

- **Figure 7** (pulse stimulation):
  ```bash
  genesis Stell+dend_layer_hines_torus+gap_normGABA.g
  ```
  Select pulse-like stimulation in `stimulus_stcgrid.g`; set `parallel_fiber_firing_rate = 5`

- **Figures 8 and 9** (beam stimulation, electrical coupling):
  ```bash
  genesis Stell+dend_layer_hines_torus+gap_normGABA.g
  ```
  Comment out selected beam in `stimulus_stcgrid.g`
  To remove electrical coupling, set `gap_junction_conductance = 0` in `Stell_layer_const.g`

- **Figure 2C** (current injection):
  ```bash
  genesis Stell+dend_layer_hines_torus+gap_normGABA.g
  ```
  Uncomment injection line and follow interactive commands

- **Figure 2G** (voltage clamp):
  ```bash
  genesis Stell+dend_layer_hines-VC-MLI449.g
  ```
  Run twice (with and without GABAA channels), then subtract

- **Figure 2E** (voltage/current clamp):
  ```bash
  genesis Stell+dend_layer_hines-VC.g
  ```

- **Figure 6A,B** (connection kernel variations):
  Modify connection kernels in `Stell+dend_layer_setup_torus_normGABA.g`

- **Figure 6C** (specific circuit configuration):
  Modify parameters in `Stell_layer_const.g` and `stimulus_stcgrid.g` as detailed in README

See [Stell+dend_layer_jn/README](/226396?tab=2&file=MLI-circuit-model_clean/Stell%2Bdend_layer_jn/README) for complete details.

### `Stell+dend_layer_PC/`
Contains code for simulations of **MLI circuits with Purkinje cells**. The code is essentially identical to `Stell+dend_layer_jn/` but with 10 inserted Purkinje cells.

**Key simulations:**
- **Figure 10** (paper):
  ```bash
  genesis Stell+dend_layer_hines_PC.g
  ```

The Purkinje cell is specified in `Purkinje_cell.g` and connected in `Purk_layer_setup.g`.

See [Stell+dend_layer_PC/README](/226396?tab=2&file=MLI-circuit-model_clean/Stell%2Bdend_layer_PC/README) for details.

## Quick Start

1. **Install GENESIS 2.2** if not already installed
2. **Navigate to the appropriate directory** for your simulation
3. **Run the desired simulation script** using the `genesis` command
4. **Modify parameters** as needed in the corresponding `.g` configuration files

Example:
```bash
cd Stell+dend_layer_jn
genesis Stell+dend_layer_hines_torus+gap_normGABA.g
```

## Key Parameters

Common parameters that can be modified (in `Stell_layer_const.g`):
- `parallel_fiber_firing_rate`: Rate of parallel fiber input (Hz)
- `weight_stellate_cell_stellate_cell_synapse`: Strength of MLI-MLI inhibition
- `gap_junction_conductance`: Strength of electrical coupling
- `number_stcs_sagitt`: Number of MLIs in sagittal direction

## File Naming Conventions

- `.g` files: GENESIS script files
- `.p` files: Morphology files (cell structure)
- `.tab` files: Tabulated channel parameters
- `*_const.g`: Parameter/constant definitions
- `*_chan*.g`: Ion channel definitions
- `*_comp*.g`: Compartment definitions
- `*_syn*.g`: Synapse definitions
- `TEST_*.g`: Test/simulation scripts

## Citation

If you use this code, please cite:

```
Maex, R., & Gutkin, B. (2017). Temporal integration and 1/f power scaling 
in a circuit model of cerebellar interneurons. Journal of Neurophysiology.
```

## ModelDB

This model is available on ModelDB: [https://modeldb.science/226396](https://modeldb.science/226396)

## Authors

- **Reinoud Maex** - Model development and implementation
- **Boris Gutkin** - Theoretical analysis

Based on earlier work by Erik de Schutter (Purkinje cell model).

## Additional Resources

- GENESIS homepage: [http://genesis-sim.org/](http://genesis-sim.org/)
- GENESIS documentation and tutorials
- Original paper for theoretical predictions: Cannon SC, Robinson DA, Shamma S (1983). "A proposed neural network for the integrator of the oculomotor system." Biol Cybern 49:127-136 [doi:10.1007/BF00320393](https://doi.org/10.1007/BF00320393)

## Notes

- Ensure sufficient disk space for output files
- Simulation output can be analyzed using standard tools (e.g., xgraph, custom scripts)
- For modifications, reconfigure using `genesis makeconfig.g` when applicable
