pgleeson / neurotune

BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Implement a NeuroML2 model instead of the example Basket Cell Model #3

Open travs opened 9 years ago

travs commented 9 years ago

What would it take for us to replace the example basket cell model with a NeuroML2 Channel model?

There is some work on using a LEMS sim by @pgleeson over here, and some discussion here.

pgleeson commented 9 years ago

Working on updating that example & maybe adding a pure NeuroML example to neurotune. See also a simpler example using neurotune here: https://github.com/pgleeson/neurotune/blob/master/examples/example_3. Much easier to run & tweak parameters there.

Relevant for https://github.com/pgleeson/neurotune/issues/2 too

pgleeson commented 9 years ago

The issue with optimizing a "pure" NML2 model using neurotune is that many of the parameters you want to change are deep, i.e. you want to alter muscle/0/SingleCompMuscleCell/biophys/membraneProperties/k_slow_all/erev etc.

That's why the framework around c302 is convenient: it does the difficult part of assigning a unique string to each parameter (e.g. k_slow_cond_density) and setting these via a python script:

   mp.channel_densities.append(ChannelDensity(cond_density=self.get_bioparameter("k_slow_cond_density").value, 
                                               id="k_slow_all", 
                                               ion_channel="k_slow", 
                                               erev=self.get_bioparameter("k_slow_erev").value,
                                               ion="k"))

This makes it easier to set these values in neurotune and optimise over a number of them: https://github.com/openworm/CElegansNeuroML/blob/master/CElegans/pythonScripts/c302/tune/c302tuner.py#L195

pgleeson commented 9 years ago

It would be better if this was a generic solution for NeuroML, but c302 is serving as a useful test case & a generic framework could be built up from this initial impl