# corebmtk
A module to allow [BMTK](https://github.com/AllenInstitute/bmtk/) to function with [Core Neuron](https://github.com/BlueBrain/CoreNeuron/) before official support.
Currently, BMTK uses `h.run` and `extracellular` NEURON mechanisms, which are both incompatible with CoreNeuron.
`corebmtk` uses `pc.psolve` and takes an alternate approach to recording and storing output. The goal of this project
was to maintain all of BMTK's functionality while allowing for the use of CoreNeuron.
Recording modules remove the `step` phase and integrate into `initialize` and `finalize` to be compatilbe with `pc.psolve`.
### Installation
```
pip install --upgrade corebmtk
```
### Usage
In your `run_network.py` `BMTK` script replace your BioSimulator with a CoreBioSimulator.
```
import corebmtk
# sim = bionet.BioSimulator.from_config(conf, network=graph)
sim = corebmtk.CoreBioSimulator.from_config(conf, network=graph)
```
When using MPI you'll have to replace your config as well. This wrapper prevents loading of mechanisms prior to running with `x86_64/special`.
```
# conf = bionet.Config.from_json(config_file, validate=True)
conf = corebmtk.Config.from_json(config_file, validate=True)
```
### Limitations
Some recoring mechanisms are not yet implemented. See run output for more info.
Implemented recording modules:
1. `reports.SpikesReport`
1. `netcon_report`
1. `reports.MembraneReport (report.params['sections'] == 'soma')`
1. `reports.ECPReport`
Modules NOT implemented
1. `mods.MembraneReport` (general)
1. `reports.ClampReport`
1. `save_synapses`
### Troubleshooting
When using ECP recording:
```CoreNEURON cannot simulate a model that contains the extracellular mechanism```
Change your `ecp report` to use `"module": "ecp"` instead of `"module": "extracellular"`
```
"ecp": {
"cells": "all",
"variable_name": "v",
"module": "ecp",
"electrode_positions": "./components/recXelectrodes/linear_electrode.csv",
"file_name": "ecp.h5",
"electrode_channels": "all"
}
```
### Acknowledgments
Thanks [@gregglickert](https://github.com/gregglickert) for kicking this project off.
[BMTK](https://github.com/AllenInstitute/bmtk/)
Raw data
{
"_id": null,
"home_page": "https://github.com/tjbanks/corebmtk",
"name": "corebmtk",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Tyler Banks",
"author_email": "tbanks@mail.missouri.edu",
"download_url": "https://files.pythonhosted.org/packages/0d/3b/ac11a1621799656bd191890d1c77f66da1491f0b5e44702d14bc937666a9/corebmtk-0.1.1.tar.gz",
"platform": null,
"description": "# corebmtk\nA module to allow [BMTK](https://github.com/AllenInstitute/bmtk/) to function with [Core Neuron](https://github.com/BlueBrain/CoreNeuron/) before official support.\n\nCurrently, BMTK uses `h.run` and `extracellular` NEURON mechanisms, which are both incompatible with CoreNeuron.\n\n`corebmtk` uses `pc.psolve` and takes an alternate approach to recording and storing output. The goal of this project\nwas to maintain all of BMTK's functionality while allowing for the use of CoreNeuron. \nRecording modules remove the `step` phase and integrate into `initialize` and `finalize` to be compatilbe with `pc.psolve`.\n\n### Installation\n\n```\npip install --upgrade corebmtk\n```\n\n### Usage\n\nIn your `run_network.py` `BMTK` script replace your BioSimulator with a CoreBioSimulator.\n\n```\nimport corebmtk\n\n# sim = bionet.BioSimulator.from_config(conf, network=graph)\nsim = corebmtk.CoreBioSimulator.from_config(conf, network=graph)\n```\n\nWhen using MPI you'll have to replace your config as well. This wrapper prevents loading of mechanisms prior to running with `x86_64/special`.\n\n```\n# conf = bionet.Config.from_json(config_file, validate=True)\nconf = corebmtk.Config.from_json(config_file, validate=True)\n```\n\n### Limitations\n\nSome recoring mechanisms are not yet implemented. See run output for more info.\n\nImplemented recording modules:\n\n1. `reports.SpikesReport`\n1. `netcon_report`\n1. `reports.MembraneReport (report.params['sections'] == 'soma')`\n1. `reports.ECPReport`\n\nModules NOT implemented\n\n1. `mods.MembraneReport` (general)\n1. `reports.ClampReport`\n1. `save_synapses`\n\n### Troubleshooting\n\nWhen using ECP recording: \n```CoreNEURON cannot simulate a model that contains the extracellular mechanism```\n\nChange your `ecp report` to use `\"module\": \"ecp\"` instead of `\"module\": \"extracellular\"`\n\n```\n \"ecp\": {\n \"cells\": \"all\",\n \"variable_name\": \"v\",\n \"module\": \"ecp\",\n \"electrode_positions\": \"./components/recXelectrodes/linear_electrode.csv\",\n \"file_name\": \"ecp.h5\",\n \"electrode_channels\": \"all\"\n }\n```\n\n### Acknowledgments\n\nThanks [@gregglickert](https://github.com/gregglickert) for kicking this project off.\n\n[BMTK](https://github.com/AllenInstitute/bmtk/)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "corebmtk",
"version": "0.1.1",
"project_urls": {
"Homepage": "https://github.com/tjbanks/corebmtk"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "592ac7c1c9e987197d153114d372ecb7e748a247559f6e236d20a71553b587df",
"md5": "f23317656e8d442386cca0e703129fd2",
"sha256": "569d6ffbcc32a12ceb0bd98645c4cb35f77ec924fc788773eca473ea242d0f7e"
},
"downloads": -1,
"filename": "corebmtk-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f23317656e8d442386cca0e703129fd2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 6875,
"upload_time": "2023-07-31T23:14:25",
"upload_time_iso_8601": "2023-07-31T23:14:25.027119Z",
"url": "https://files.pythonhosted.org/packages/59/2a/c7c1c9e987197d153114d372ecb7e748a247559f6e236d20a71553b587df/corebmtk-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0d3bac11a1621799656bd191890d1c77f66da1491f0b5e44702d14bc937666a9",
"md5": "d8b9f98156096d14999733e0f4b2a4cf",
"sha256": "58adbc3547c1bc8c4424c6506db44ff73a15c180ef70f517227580e77098d626"
},
"downloads": -1,
"filename": "corebmtk-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "d8b9f98156096d14999733e0f4b2a4cf",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 6578,
"upload_time": "2023-07-31T23:14:26",
"upload_time_iso_8601": "2023-07-31T23:14:26.869353Z",
"url": "https://files.pythonhosted.org/packages/0d/3b/ac11a1621799656bd191890d1c77f66da1491f0b5e44702d14bc937666a9/corebmtk-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-31 23:14:26",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "tjbanks",
"github_project": "corebmtk",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "corebmtk"
}