NeuroML / NeuroML2

This repository hosts the NeuroML 2 Schema, the ComponentType definitions in LEMS and the core documentation of NeuroML2.
https://docs.neuroml.org
GNU Lesser General Public License v3.0
50 stars 24 forks source link

[Question] Capturing arbitrary kintetics in NeuroML #187

Open sanjayankur31 opened 2 years ago

sanjayankur31 commented 2 years ago

@ramcdougal asked on the chat channels:

I'm trying to write some NeuroML to capture arbitrary kinetics that I can then convert via pynml into a MOD file for simulation, and I'm getting close to understanding how to do it, but I'm not quite there... what I have is: https://www.dropbox.com/s/c1oqm6dvsd8u1ex/test6.nml?dl=0

Questions:

pgleeson commented 2 years ago

@ramcdougal Ok if I share your example e.g. here: https://github.com/OpenSourceBrain/NEURONShowcase so it can be worked up into a test case?

ramcdougal commented 2 years ago

Ok.

This is probably not something that should be used as an example though, as it is not intended to represent anything biological.

pgleeson commented 2 years ago

@ramcdougal slowly getting round to looking at this... I've added your example here: https://github.com/OpenSourceBrain/NEURONShowcase/tree/master/test/arbitrary_kintetics

This is down to a known bug unfortunatelty, you have to redefine the species using <Text name="species"/> in your new component type, see changes https://github.com/OpenSourceBrain/NEURONShowcase/commit/6673394ada9b4066611b703ad6685cf4d2b137d6#diff-3561b0abba1b5911818befaed670ec743d8c6143e5db9515164096cc528c58de which at least allow the mod file to be generated & compiled. Issue to fix is here: https://github.com/LEMS/jLEMS/issues/84. 6 years old, but not insurmountable, but just fiddly to fix...

Yes, the current translator is hard coded for just one species, except when there's a Ca dependence. Certainly a new lems component type could be created with species1 and species2 etc. which would run in jlems, but the mod file generation would have to be updated in the java...

Any comp type which needs a temperature has to add a requirement for this, e.g.

https://github.com/NeuroML/NeuroML2/blob/2c397d00bd4b9aa03313165777d6ca4cfa437755/NeuroML2CoreTypes/Channels.xml#L143-L147

This is then provided by the network which is of type networkWithTemperature:

https://github.com/NeuroML/NeuroML2/blob/2c397d00bd4b9aa03313165777d6ca4cfa437755/LEMSexamples/LEMS_NML2_Ex15_CaDynamics.xml#L333

More later...