<?xml version="1.0" encoding="UTF-8"?>
<neuroml xmlns="http://morphml.org/neuroml/schema"
    xmlns:mml="http://morphml.org/morphml/schema"
    xmlns:nml="http://morphml.org/networkml/schema"
    xmlns:meta="http://morphml.org/metadata/schema"
    xmlns:bio="http://morphml.org/biophysics/schema"
    xmlns:cml="http://morphml.org/channelml/schema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://morphml.org/neuroml/schema http://www.neuroml.org/NeuroMLValidator/NeuroMLFiles/Schemata/v1.8.0/Level3/NeuroML_Level3_v1.8.0.xsd"
    name = "NeuroML Level 1, 2 and 3 PG cell model"
    lengthUnits="micron">

<meta:notes>author: Aditya Gilra adapted from Cleland and Sethupathy 2006.</meta:notes>

<cells>
  <cell name="PG">
    <meta:notes>Cell: periglomerular morphml written by hand by Aditya Gilra, NCBS, Bangalore, India.</meta:notes>
    <segments xmlns="http://morphml.org/morphml/schema"> <!-- Changing the namespace from neuroml to morphml-->
<!-- Section: soma -->
      <segment id="0" name = "soma" cable = "0">
        <proximal x="0" y="0" z="0" diameter="8"/>
        <distal x="8" y="0" z="0" diameter="8"/>
      </segment>
<!-- Section: dendrites -->
      <segment id="1" name = "dend0" parent="0" cable = "1">  <!-- Connected at 1 on parent section: soma  -->
        <proximal x="8" y="0" z="0" diameter="1"/>
        <distal x="28" y="0" z="0" diameter="1"/>
      </segment>
      <segment id="2" name = "dend1" parent="0" cable = "2">  <!-- Connected at 1 on parent section: soma  -->
        <proximal x="8" y="0" z="0" diameter="1"/>
        <distal x="8" y="20" z="0" diameter="1"/>
      </segment>
      <!-- I don't really need the spines: just ensure that the soma EPSP is the same as with spines -->
      <!--<segment id="3" name = "spineneck0" parent="1" cable = "3">
        <proximal x="28" y="0" z="0" diameter="0.1"/>
        <distal x="28.5" y="0" z="0" diameter="0.1"/>
      </segment>
      <segment id="4" name = "spinehead0" parent="3" cable = "4">
        <proximal x="28.5" y="0" z="0" diameter="1"/>
        <distal x="29" y="0" z="0" diameter="1"/>
      </segment>
      <segment id="5" name = "spineneck1" parent="2" cable = "5">
        <proximal x="8" y="20" z="0" diameter="0.1"/>
        <distal x="8" y="20.5" z="0" diameter="0.1"/>
      </segment>
      <segment id="6" name = "spinehead1" parent="5" cable = "6">
        <proximal x="8" y="20.5" z="0" diameter="1"/>
        <distal x="8" y="21" z="0" diameter="1"/>
      </segment>-->
    </segments>
    <cables  xmlns="http://morphml.org/morphml/schema"> <!-- Changing namespace from neuroml to morphml-->
      <!--
      <cable id="0" name="soma">
        <meta:group>all</meta:group>
        <meta:group>somagroup</meta:group>
      </cable>
      <cable id="1" name="dend0">
        <meta:group>all</meta:group>
        <meta:group>periphery</meta:group>
        <meta:group>dendrites</meta:group>
      </cable>
      <cable id="2" name="dend1">
        <meta:group>all</meta:group>
        <meta:group>periphery</meta:group>
        <meta:group>dendrites</meta:group>
      </cable>
      <cable id="3" name="spineneck0">
        <meta:group>all</meta:group>
        <meta:group>periphery</meta:group>
      </cable>
      <cable id="4" name="spinehead0">
        <meta:group>all</meta:group>
        <meta:group>periphery</meta:group>
        <meta:group>spineheads</meta:group>
      </cable>
      <cable id="5" name="spineneck1">
        <meta:group>all</meta:group>
        <meta:group>periphery</meta:group>
      </cable>
      <cable id="6" name="spinehead1">
        <meta:group>all</meta:group>
        <meta:group>periphery</meta:group>
        <meta:group>spineheads</meta:group>
      </cable>
      -->
      <cable id="0" name="soma"/>
      <cable id="1" name="dend0"/>
      <cable id="2" name="dend1"/>
      <!--<cable id="3" name="spineneck0"/>
      <cable id="4" name="spinehead0"/>
      <cable id="5" name="spineneck1"/>
      <cable id="6" name="spinehead1"/>-->
      <cablegroup name="all"> 
        <cable id = "0"/>
        <cable id = "1"/>
        <cable id = "2"/>
        <!--<cable id = "3"/>
        <cable id = "4"/>
        <cable id = "5"/>
        <cable id = "6"/>-->
      </cablegroup>
      <cablegroup name="somagroup"> 
        <cable id = "0"/>
      </cablegroup>
      <cablegroup name="dendrites"> 
        <cable id = "1"/>
        <cable id = "2"/>
      </cablegroup>
      <cablegroup name="ORNdendrite"> 
        <cable id = "1"/>
      </cablegroup>
      <cablegroup name="periphery"> 
        <cable id = "1"/>
        <cable id = "2"/>
        <!--<cable id = "3"/>
        <cable id = "4"/>
        <cable id = "5"/>
        <cable id = "6"/>-->
      </cablegroup>
      <!--<cablegroup name="spineheads"> 
        <cable id = "4"/>
        <cable id = "6"/>
      </cablegroup>-->
    </cables>
      <biophysics units='Physiological Units'>
        <!-- Note: values of cond dens are different in NEURON and phy units-->
        <bio:mechanism xmlns:bio='http://morphml.org/biophysics/schema' passive_conductance='true' type='Channel Mechanism' name='pas'>
          <bio:parameter name='gmax' value='0.5'> <!-- 3 ms time constant with CM=1microF/cm^2 --><!-- 1GigaOhm for 8micron dia soma gives 0.5 mS/cm^2-->
            <bio:group>all</bio:group>
          </bio:parameter>
          <bio:parameter name='e' value='-67'>
            <bio:group>all</bio:group>
          </bio:parameter>
        </bio:mechanism>
        <!-- capacitance and axial resistance and init_memb_potential must be at the very end! Order is important! -->
        <bio:spec_capacitance xmlns:bio='http://morphml.org/biophysics/schema'>
          <bio:parameter value='1.0'>
            <bio:group>all</bio:group>
          </bio:parameter>
        </bio:spec_capacitance>
        <bio:spec_axial_resistance xmlns:bio='http://morphml.org/biophysics/schema'>
          <bio:parameter value='0.2'>
            <bio:group>all</bio:group>
          </bio:parameter>
        </bio:spec_axial_resistance>
        <bio:init_memb_potential>
          <bio:parameter value="-65">  
            <bio:group>all</bio:group>
          </bio:parameter>
        </bio:init_memb_potential>
      </biophysics>
      <connectivity>
        <nml:potential_syn_loc xmlns="http://networkml.org/ml/schema" synapse_type="ORN_PG" synapse_direction="post">
          <!--<nml:group>spineheads</nml:group>-->
          <nml:group>dendrites</nml:group>
          <!--<nml:group>ORNdendrite</nml:group>-->
        </nml:potential_syn_loc>
        <nml:potential_syn_loc xmlns="http://networkml.org/ml/schema" synapse_type="mitral_PG" synapse_direction="post">
          <!--<nml:group>spineheads</nml:group>-->
          <nml:group>dendrites</nml:group>
        </nml:potential_syn_loc>
        <nml:potential_syn_loc xmlns="http://networkml.org/ml/schema" synapse_type="PG_mitral" synapse_direction="pre">
          <!--<nml:group>somagroup</nml:group>-->
          <nml:group>dendrites</nml:group>
        </nml:potential_syn_loc>
        <nml:potential_syn_loc xmlns="http://networkml.org/ml/schema" synapse_type="SA_PG" synapse_direction="post">
          <nml:group>dendrites</nml:group>
        </nml:potential_syn_loc>
      </connectivity>
  </cell>
</cells>
</neuroml>