This is an interactive web notebook using Jupyter technologies which can be used to run the HH model, change the parameters of the model and display the dynamical properties of variables.
This notebook was developed as part of Google Summer of Code 2022 by Rahul Sonkar.
Advantage: you can save any changes you make to the notebook in your OSBv2 workspace, and view/edit other files associated with the model including the Python implementation of the HH model.
- Go to Open Source Brain v2 and register for a new account and log in.
- Go to the Hodgkin Huxley model repository page at https://v2.opensourcebrain.org/repositories/33.
- Click on New workspace from selection (blue button).
- When this has been created, go to the new workspace page and click on Open with JupyterLab.
- This opens a copy of all the files in the repository in JupyterLab.
- In the left had file browser navigate to the folder
Hodgkin Huxley Tutorials/master/notebooks/Python_HH_version
and double click onPython_Notebook_HH.ipynb
to open the notebook. - You should be able to run the interactive widget by click the double arrow (▶▶) in the JupyterLab toolbar at the top of the notebook.
- Note: the lighter version of the JupyterLab interface shown above can be accessed in the menu:
Settings -> Theme -> JupyterLab Light
.
Advantage: quick to start & run, no login required
- The notebook can also be opened using Binder. Click here to open the HH notebook: -
- You should be able to run the interactive widget by click the double arrow (▶▶) in the JupyterLab toolbar at the top of the notebook.
Advantage: can store your progress on your Google drive, but requires Google account and additional setup
- The notebook can also be opened in Google Collab, but you will need to add a new cell to the top of the notebook and paste the following to set it up to run properly:
from google.colab import output
output.enable_custom_widget_manager()
from google.colab import drive
drive.mount("/content/gdrive")
%cd /content/gdrive/MyDrive
!ls
!rm -rf hodgkin_huxley_tutorial # remove this line if you do not want to remove your existing copy to create a new one
!git clone --depth 1 https://github.com/openworm/hodgkin_huxley_tutorial/
%cd hodgkin_huxley_tutorial/
!pip install -r requirements.txt
%cd notebooks/Python_HH_version/
This does the following:
- asks you to allow Google Collab access your Google Drive when run for the first time: please allow all permissions
- mounts your Google Drive
- copies the GitHub repositoriy into it under the "hodgkin_huxley_tutorial" folder
- installs the required Python packages