Installation¶
Prerequisites¶
To run simulations |
For analysis and plotting |
|---|---|
Python >= 3.12 |
|
NEURON>=8.2 (with MPI support) |
|
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¶
$ wget -qO- https://astral.sh/uv/install.sh | sh
$ curl -LsSf https://astral.sh/uv/install.sh | sh
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
See the 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:¶
$ source .venv/bin/activate
.venv\Scripts\activate
Caution
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
$ python s_sim_setup.py specs\s_template.py
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.
For a high-level overview of the repository, checkout the project structure.
analysis/examples/BaseModel.ipynb provides some basic plots generated from the simulation data.