arbor icon indicating copy to clipboard operation
arbor copied to clipboard

AEP: [NML2] Extend NeuroML Coverage

Open thorstenhater opened this issue 3 years ago • 3 comments

Introduction

We are missing two major parts of the NeuroML (NML) specification that seems to be used heavily by our partners and would thus be a major selling point for Arbor

  1. Network descriptions
  2. Ion channel dynamics

As Arbor's way of describing network is still quite primitive, I propose to postpone 1. until we have a more solid understanding of the Arbor way.

However, 2. is a major pain point as the current route of getting NML mechanisms into Arbor is to use jNML to export the mechanisms to NMODL and compiling them through modcc into an Arbor catalogue. This neccessitates hand-editing of the output to adjust to Arbor-flavoured NMODL, which is also approximately an order of magnitude slower than hand-written NMODL. This further hindered by the readability of jNML's output and needs to be done every time an .nml file changes.

Therefore, we should have native support of NML mechanisms in Arbor. I propose to work in these stages:

  1. Parsing nml, selecting, and configuring mechanisms from a pre-built catalogue.
  2. Using jLEMS to compile LEMS to Arbor.
  3. Full LEMS support in Arbor.

This is made feasible due to the MechABI and might tie into ArbLang or its compiler in stage 3.

Update November 2021

After spending time with the NML2 specifications and building a prototype reader for .nml, we must discard option 1. from the list. It is simply not feasible due to the nature of NML. Example

    <ionChannelHH id="NaConductance" conductance="10pS" species="na">

        <gateHHrates id="m" instances="3">
            <forwardRate type="HHExpLinearRate" rate="1per_ms" midpoint="-40mV" scale="10mV"/>
            <reverseRate type="HHExpRate" rate="4per_ms" midpoint="-65mV" scale="-18mV"/>
        </gateHHrates>

        <gateHHrates id="h" instances="1">
            <forwardRate type="HHExpRate" rate="0.07per_ms" midpoint="-65mV" scale="-20mV"/>
            <reverseRate type="HHSigmoidRate" rate="1per_ms" midpoint="-35mV" scale="10mV"/>
        </gateHHrates>

    </ionChannelHH>

This ion channel can -- in principle -- have an arbitrary number of gateHHrates, each with a forward and a backward rate chosen from multiple implementations of baserate.

Traversing the implementation and building custom instantiations is the only viable path forward.

thorstenhater avatar Aug 09 '21 10:08 thorstenhater

Some sources for nml files:

  • https://neuroml-db.org/
  • https://github.com/OpenSourceBrain/osb-model-validation/tree/master/utilities/tests

brenthuisman avatar Oct 13 '21 17:10 brenthuisman

Invite users to use this by v0.8.

  • [ ] Move repo to arbor-org
  • [ ] Advertise the project on website/channels/etc.

brenthuisman avatar Aug 02 '22 11:08 brenthuisman

This is not at the level of polish it needs for 0.8, @llandsmeer and me are still making nmlcc ready for release.

thorstenhater avatar Oct 18 '22 07:10 thorstenhater