Skip to content

tiny-infinity/GridCellsCopy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

237 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License: MIT

Grid Cells Conductance-based Model

A conductance-based model of Grid cells, implemented using the NEURON simulator with parallelized functionality for efficient simulations. Grid cells are crucial for spatial navigation, and this model replicates their dynamics with biologically realistic conductances.

Key Features:

  • Conductance-based implementation of Stellate cells and Inhibitory Interneurons of the medial entorhinal cortex.
  • Parallelized Simulation: leveraging NEURON for multi-core simulations to handle large networks efficiently.
  • User-Friendly Code: Clear structure with modular components for easy setup, modification, and analysis.

Prerequisites

To run simulations For analysis and plots:
Python >= 3.12 SciPy>=1.13
NEURON>=8.2 (with MPI support) matplotlib>=3.9
numpy >= 1.26.4 seaborn>=0.13.2
h5py >= 3.12

Installation with uv

This repository uses uv for dependency management. You can use uv.lock to sync your local environment to match the simulation requirements.

Clone the repository:

$ git clone https://github.com/assisilab/GridCellsCond.git
$ cd GridCellsCond

Install uv

#Linux
wget -qO- https://astral.sh/uv/install.sh | sh

#macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

#Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

See uv installation guide for alternative installation methods.

Sync environment

Running uv sync sets up a virtual environment and installs all the dependencies.

Important

On Windows systems, NEURON must be installed separately through its GUI installer - NEURON

In the project directory, run:

uv sync

Activate environment:

#For macOS/Linux
source .venv/bin/activate

#For Windows
.venv\Scripts\activate

Warning

This must be executed in every instance of the terminal. You can configure VS Code to handle python environments.

Running a simulation

To run a simulation, compile the mod files and pass a specs file to s_sim_setup.py.

nrnivmodl mod
python s_sim_setup.py specs/s_template.py # specs\s_template.py for Windows

A specs file contains a subset of parameters that override the default parameters to run a simulation. The default parameters are stored in default_model_params.json and default_sim_params.json. Data from the simulation is saved in data/{sim_id}, with sim_id specified in the specs file.

analysis\examples\BaseModel.ipynb provides some basic plots generated from the simulated data.

Refer the docs for details on the project's structure and parameters.

Cite

Shaikh Inayath, Assisi Collins (2025) Intrinsic and circuit mechanisms of predictive coding in a grid cell network model eLife 14:RP108142.

https://doi.org/10.7554/eLife.108142

About

Sem Project Stuff A conductance-based model of Grid Cells

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 78.8%
  • C 18.0%
  • NMODL 2.1%
  • Other 1.1%