AllenInstitute / bmtk

Brain Modeling Toolkit
https://alleninstitute.github.io/bmtk/
BSD 3-Clause "New" or "Revised" License
261 stars 84 forks source link

Refer to NEST models and NESTML #363

Open Jballbe opened 3 months ago

Jballbe commented 3 months ago

Hi,

I am implementing a network model using BMTK, and I was studying one of your tutorials where you refer a GLIF model : { "N": 2384, "model_name": "Sst_501282204", "cell_line": "i4Sst", "ei": "i", "model_type": "point_neuron", "model_template": "nest:glif_lif_asc_psc", "dynamics_params": "501282204_glif_lif_asc_config.json" }, However the glif_lif_asc_psc is not referred to on the NEST model page . Is this name referring to a subfile of NEST? if so, do you know where we can find the list of available models' name?

Also, I was wondering if I could use BMTK with NESTML to have a custom neuron model?

Thank you very much for your help! Best regards,

Julien Ballbé

kaeldai commented 3 months ago

Hi @Jballbe

The "glif_lif_asc_psc" is an older version of the NEST glif model so you are correct it doesn't correspond to any of the built-in NEST models. However, to help with backwards compatability, BMTK will automatically convert "glif_lif_asc_psc" => "glif_psc" and also update the .json file accordingly. We are in the process of updating the tutorial, but in the mean-time there is a point_450glifs/ example that is more up-to-date.

However if you want to use the old tutorials you can use the following code to convert the old glif model + AIBS json file into the appropiate NEST values:

import json
from bmtk.simulator.pointnet.glif_utils import convert_aibs2nest

nest_model, nest_params = convert_aibs2nest('nest:glif_lif_asc_psc', json.load(open('501282204_glif_lif_asc_config.json', 'r')))
kaeldai commented 3 months ago

As far as your other question - I believe at the moment NESTML support has not been added to the main bmtk branch. However much work has been done (by another developer) on this and we may be able to add it very soon. I will need to talk to the other developer and get back with you.

Jballbe commented 2 months ago

Hi @kaeldai ,

Thank you very much for your precisions about the glif_lif_asc_psc model name, that enlightens me! I have another question about the different NEST models, if I want to use another model available in NEST (let's say aeif_psc_delta_clopath – Adaptive exponential integrate-and-fire neuron), In the add_nodes command, can I pass in 'dynamics_params' a json file containing the different model parameters values? If yes, I suppose the different parameters names should correspond to those present in the NEST description?

Thank you for NESTML, I'd love to be able to use it!

xpliu16 commented 2 months ago

Hi Julien,

Yes, I believe it should work that way - please let us know if you run into any issues. I have passed along to Kael a draft PR of NESTML that works for cell models, but turns out to be a bit more complicated for synapse models. Are you interested mostly in cell models for NESTML?

Thanks, Ping

Jballbe commented 2 months ago

Hi Ping,

Thank you for your answer! I am sorry but what do you mean by "draft PR" ? I don't have the acronym... Indeed, for now I am mostly interested in using custom cell models. Regarding the synapses , I use static models ("Static_ExctoExc.json"...), those found in your workshop repository, and I don't plan to use custom synaptic model in a short time scale. Would those static synapses work together with NESTML?

Thank you ! Julien

xpliu16 commented 2 months ago

Hi Julien,

PR = pull request (to merge code into the main repository). I just meant that I passed along my partial work to Kael who will work on testing it against latest Nest and incorporating it. Good to know that you're mostly interested in cell models - I believe those should be doable. I also think you can mix nestml cell models with standard static synapse, but Kael can confirm that in testing.

We'll keep you posted, Ping