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

[Question] Capturing arbitrary kintetics in NeuroML #187

Open
sanjayankur31 opened this issue May 27, 2022 · 3 comments
Open

[Question] Capturing arbitrary kintetics in NeuroML #187

sanjayankur31 opened this issue May 27, 2022 · 3 comments
Labels
T: question Type: question

Comments

@sanjayankur31
Copy link
Member

@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:

  • I thought putting species="k" would cause it to generate an "ik" not a nonspecific current... how do I do this?
  • It looks like the NeuronWriter only allows using one species at a time, with the possible exception of things that are calcium dependent. Is that true? If not, is there a way to have mgi here -- in our "potassium" channel model -- be what you'd get from "USEION mg READ mgi"
  • Conversion automatically includes an assigned of "celsius" in the generated MOD file; is this variable available in all exported formats or how can I write the nml such that it'll translate correctly to mod but also work on other platforms?
  • What's the intended role of the "conductance" parameter. Both it and gmax are automatically added to the MOD file, but the current calculation is forced to be ohmic (or ghk, or maybe a couple other fixed formats)... and that gion seems hard-coded in the NeuronWriter to be based on gmax not conductance?
  • Any gotchas I should be aware of with the NeuronWriter? I'm mostly basing my understanding of how to write NeuroML by trying things and seeing what happens when I translate to MOD files
@sanjayankur31 sanjayankur31 added the T: question Type: question label May 27, 2022
@pgleeson
Copy link
Member

@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
Copy link

Ok.

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

@pgleeson
Copy link
Member

pgleeson commented Jun 1, 2022

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

  • I thought putting species="k" would cause it to generate an "ik" not a nonspecific current... how do I do this?

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 OpenSourceBrain/NEURONShowcase@6673394#diff-3561b0abba1b5911818befaed670ec743d8c6143e5db9515164096cc528c58de which at least allow the mod file to be generated & compiled.
Issue to fix is here: LEMS/jLEMS#84. 6 years old, but not insurmountable, but just fiddly to fix...

  • It looks like the NeuronWriter only allows using one species at a time, with the possible exception of things that are calcium dependent. Is that true? If not, is there a way to have mgi here -- in our "potassium" channel model -- be what you'd get from "USEION mg READ mgi"

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...

  • Conversion automatically includes an assigned of "celsius" in the generated MOD file; is this variable available in all exported formats or how can I write the nml such that it'll translate correctly to mod but also work on other platforms?

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

<ComponentType name="baseQ10Settings"
description="Base ComponentType for a scaling to apply to gating variable time course, usually temperature dependent">
<Exposure name="q10" dimension="none"/>
<Requirement name="temperature" dimension="temperature"/>

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

<network id="net1" type="networkWithTemperature" temperature = "32 degC">

More later...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: question Type: question
Projects
Status: 🆕 New
Development

No branches or pull requests

3 participants