Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using PyPNS with up-to-date NEURON and Python #5

Closed
WarrenDJ opened this issue Feb 28, 2022 · 3 comments · Fixed by #6
Closed

Using PyPNS with up-to-date NEURON and Python #5

WarrenDJ opened this issue Feb 28, 2022 · 3 comments · Fixed by #6

Comments

@WarrenDJ
Copy link

I recently assigned to graduates students to model the compound action potential using PyPNS, where I was somewhat directing students as they did the work. I soon found out that using NEURON 8.0 and Python 3.9 was mostly a bust. We all found out that we were able run simulations with myelinated axons, but the results were reliably zero (under Windows, WSL, Ubuntu, and MacOS). Since that experience, I have played around with the code a lot to see if it works with the version of NEURON mentioned in the paper (7.6.7). Using that version, I was able to replicate the contents of Figure 9A to 9D from the paper. It would be great to not have to use out of date versions. Anyone have any ideas what broke between NEURON 7.6.7 and 8.0, and how to fix it?

@chlubba
Copy link
Owner

chlubba commented Mar 1, 2022

Hi Warren,

thank you for the feedback!

NEURON 8.0 seems to have introduced quite deep changes to the Python interface. For example, the h.run function has been removed. According to the docs, this seems to have been replaced by h.continuerun. Also other functions such as h.Section have changed.

The amount of work required for making PyPNS NEURON-8.0-ready is therefore not easily predictable. We will update PyPNS, but cannot say when this update will be completed. Until then, users need to stick with NEURON 7.6.7.

If you happen to attempt to tweak PyPNS for NEURON 8.0, thank you for considering forking and submitting a pull request.

Best,
Carl

@WarrenDJ
Copy link
Author

WarrenDJ commented Mar 1, 2022 via email

@nrnhines
Copy link
Contributor

For example, the h.run function has been removed.

h.run() is still present if neuron import gui or h.load_file("stdrun.hoc")
I believe the author of the mentioned docs page just prefers to explicitly use h.finitialize(...) instead of h.stdinit() with their global v_init and tstop variables. In stdrun.hoc it is still declared as

proc run() {
        running_ = 1
        stdinit()
        continuerun(tstop) 
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants