{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "9ae35e8b",
   "metadata": {},
   "source": [
    "# NeuroML2\n",
    "\n",
    "[NeuroML2](https://neuroml.org/) is an XML-based, community standard for\n",
    "describing neuronal models — including detailed morphologies — in a\n",
    "simulator-independent way. `braincell` reads the morphology portion through\n",
    "{class}`braincell.io.NeuroMlReader`.\n",
    "\n",
    "## Loading"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "96680808",
   "metadata": {},
   "outputs": [],
   "source": [
    "from braincell.io import NeuroMlReader\n",
    "\n",
    "reader = NeuroMlReader()\n",
    "morpho = reader.read(\"neuron.cell.nml\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "77a1d68c",
   "metadata": {},
   "source": [
    "The reader extracts the segment groups and cable geometry from the NeuroML2\n",
    "document and returns a standard {class}`braincell.Morphology`, which you then\n",
    "decorate and simulate like any other.\n",
    "\n",
    "```{note}\n",
    "`braincell` reads NeuroML2 **morphology**. Channel and network definitions in a\n",
    "NeuroML2 document are not imported automatically — declare mechanisms with\n",
    "{mod}`braincell.mech` as usual (see {doc}`../concepts/mechanisms`).\n",
    "```\n",
    "\n",
    "## See also\n",
    "\n",
    "- {doc}`swc` and {doc}`asc` — the other supported morphology formats.\n",
    "- {doc}`../apis/io` — the full IO reference."
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "name": "python"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
