-
Notifications
You must be signed in to change notification settings - Fork 0
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
Sin wave current stimulus [v3.last] proposal [update] #21
Comments
Hi! Can you try to move to v4 of the BSB: it is the only major version we currently offer open source support for. Then you'd have to clarify a bit what you are trying to do, I'm seeing mixed things happening here. From your description it appears that you are trying to package your own NMODL file using Glia? Then you follow it up with snippets of BSB configurations, and I'm seeing what I believe to be an MPI related error message tail in your logs. That's a lot of moving parts at the same time: problems with Glia, and doing MPI-parallel tasks with the BSB. Why don't we start simple and see if we can simply use Glia to insert your mechanism in a NEURON section. The latest version of Glia is actually called Then there is a guide that explains how to create your own Glia package and add your own NMODL file to it: https://nmodl-glia.readthedocs.io/en/latest/index.html#document-package (Glia 4 also supports a "local library", so you wouldn't even need a package, you could just do The guide mentions to Afterwards, say you have a
Let me know how that goes, and then we can continue helping you getting started with NEURON simulations in BSB 4 |
Thanks for the reply! Ok, in the meantime I will try to migrate to v4. Maybe it could be a quicker solution. My intention is to integrate an oscillatory electrical stimulation tool (precisely sine wave). In v3.10 using the json file I can indicate all the simulation commands.
I wouldn't know how to integrate it. I generated this Python file to automate the whole process which works great with the stock version of BSB v3.10.:
Then I will gradually start moving all the work to another environment with v4. In the meantime, thanks again for the reply. I will update you in future developments. |
For which scope? For NEURON users, or for BSB users? You do not necesarily need to involve the BSB for this purpose. You can write your NMODL file, and package/distribute it with Glia. And then all NEURON users can already use your tool. It is another additional step to write a BSB component for your NEURON tool. Let's go step by step
We're not yet at the stage of integrating anything, the code snippet I gave you is a standalone test that confirms whether your Glia package works. First make the Glia package, and prove that it works with this code snippet. (PS: It is not something to "integrate", it is plain python code that you should run with
So what your script does is run an MPI-BSB simulation on 16 nodes on an (to me) unknown network reconstruction file, and then moves the HDF5 result files around. I'm still missing what configuration file was used to reconstruct that network? |
I would like this sine wave device to be integrated inside BSB to test the behavior of the network as naturally as possible, so I assume that the last part of the answer is the key step. I'll start by trying to create the package with Glia. The goal however is to use it with BSB and use the device on the network (as if it were a NEURON icurrent device).
Ok, I'll try with Glia package in meanwhile.
Exact. A JSON configuration file with the appropriate settings (cerebellar network) is loaded and the results moved to hdf5. |
That's not what appears to be happening:
This uses |
This is because I use some scripts to handle the configuration file for the simulation:
The network has been created ex novo by using:
Don't worry, for now it isn't confidential. I can post it here. Just to be clear, I would like to make a device in order to integrate it into BSB's JSON file as well:
|
OK, so your configuration is based on the cerebellar model of the DBBS laboratory. I would urge you, when developing new things, to make your test cases as simple as possible, to eliminate moving parts and sources of errors, and to reduce the complexity of your test scenario. Let me know what happens once you have created the Glia package and have tried to run the test snippet I sent you. |
Of course, I am already using a scaffold of very small size and few neurons which in a few minutes is able to return a preliminary result without too much effort. Clearly the problem is to get at least as far as a simulation. These days I will work on the transfer to 4.0 I will keep the 3.10 for basic analysis, as I know how it works very well. I'll keep you updated soon |
Ok, but just to confirm you understand that at this point we are not ready to use any BSB at all. Please send me the output of the following code, ran in a Python interpreter: import glia
from patch import p
s = p.Section()
glia.insert(s, 'sinclamp') |
Of course, I understood. This is the output:
|
This warning is probably fine. If not, try updating urllib to v2
This is a message NEURON sends when it initializes MPI, so that's fine too. It looks like you've succesfully inserted your I'm looking forward to seeing some plots :) If all is well we can move to include your Glia package in a BSB4 model :) |
On NEURON, I have already developed and introduced this tool (I later discovered that there was already one called 'izap').
That would be fantastic! For now, these are simple equations, but it would be interesting to introduce this oscillatory tool into much more complex circuits! Great, I'll get to work on testing Glia! I’ll try to produce some graphs. ;) |
Hello everyone! Here we are again! :)
Originally posted by @SimoneTorsello in dbbs-lab/bsb-core#721 (comment)
I finally managed to create a package called sinclamp, but I'm still unable to insert it into the simulation. The procedure is as follows and requires Astrocyte and nrn-glia (I'm using version v3.latest):
Install Astrocyte and create the package:
Generate the desired
.mod
file and load it:Run the commands to build and install the package:
I don't know if it's necessary, but I also used:
After confirming the installation, I used:
The installed packages are:
Great!
Now, however, I can't manage to load the tool into the
.json
simulation file, as in the following example:I am obviously getting this error:
Now: I have observed the
__init__.py
file, and the mechanisms are included in the collection; however, they are not actual NEURON tools but only ion channels.Am I lost again, or am I finally close to a solution?
Thanks a lot, and have a great evening.
Originally posted by @SimoneTorsello in dbbs-lab/bsb-core#721 (comment)
The text was updated successfully, but these errors were encountered: