translation between NeuroML and FacetsML
The translation of Populations and Projections between those standards should not be a problem, because the way they are declared in FacetsML is inspired from NeuroML. The translations of Cells is much more complex.
Populations
A population declared in FacetsML like that :
<populations>
<population name="exc_cells" label="Excitatory_Cells">
<dim size="4000"/>
<cell_type name="cellA"/>
<randomInit rng="rng">
<rand:uniform min="-60." max="-50."/>
</randomInit>
</population>
</populations>
will naturally become in NeuroML :
<net:populations>
<net:population name="exc_cells">
<net:cell_type>cellA</net:cell_type>
<net:pop_location>
<net:random_arrangement>
<net:population_size>4000</net:population_size>
<net:rectangular_location>
<meta:corner x="0" y="0" z="0"/>
<meta:size depth="4000" height="4000" width="4000"/>
</net:rectangular_location>
</net:random_arrangement>
</net:pop_location>
</net:population>
</net:populations>
The only thing which could be a problem is the spatial location of the population, and its size. That could be calculated in the XSLT transformation.
Projections
A projection declared in FacetsML like that :
<projections>
<projection name="e2e"
presynaptic_population_name="exc_cells"
postsynaptic_population_name="exc_cells"
method="fixedProbability"
weight="0.004"
target="excitatory"
rng="rng">
<methodParameter name="p_connect" value="0.02"/>
</projection>
</projections>
(the "p_connect" methodParameter could become an attribute of a markup "fixedProbability" if the parameters of the projection methods can be stabilized)
That projection would become in NeuroML :
<net:projections units="Physiological Units">
<net:projection name="e2e">
<net:source>exc_cells</net:source>
<net:target>exc_cells</net:target>
<net:synapse_props>
<net:synapse_type>ExcitatorySynapse_exc_cells</net:synapse_type>
<net:default_values weight="0.004"/>
</net:synapse_props>
<net:connectivity_pattern>
<net:fixed_probability probability="0.02"/>
</net:connectivity_pattern>
</net:projection>
</net:projections>
Cells
For now, the only PyNN standardized model which can be translated in NeuroML is the "IF_cond_exp" neuron, defined like that in common.py :
class IF_cond_exp(StandardCellType):
"""Leaky integrate and fire model with fixed threshold and decaying-exponential post-synaptic conductance."""
default_parameters = {
'v_rest' -65.0, Resting membrane potential in mV 'cm' 1.0, Capacity of the membrane in nF 'tau_m' 20.0, Membrane time constant in ms 'tau_refrac' 0.0, Duration of refractory period in ms 'tau_syn_E' 5.0, Decay time of the excitatory synaptic conductance in ms 'tau_syn_I' 5.0, Decay time of the inhibitory synaptic conductance in ms 'e_rev_E' 0.0, Reversal potential for excitatory input in mV 'e_rev_I' -70.0, Reversal potential for inhibitory input in mV 'v_thresh' -50.0, Spike threshold in mV 'v_reset' -65.0, Reset potential after a spike in mV 'i_offset' 0.0, Offset current in nA 'v_init' -65.0, Membrane potential in mV at t = 0 }
Here is its declaration in FacetsML :
<cells>
<cell name="cellA">
<class:IF_cond_exp v_rest="-60."
cm="1."
tau_m="20."
tau_refrac="5."
tau_syn_E="5."
tau_syn_I="10."
e_rev_E="0."
e_rev_I="-80."
v_thresh="-50."
v_reset="-60."
i_offset="0.1"
v_init="-65.0" />
</cell>
</cells>
which becomes in NeuroML :
<cells>
<cell name="cellA">
<meta:notes>Instance of PyNN IF_cond_exp cell type</meta:notes>
<mml:segments>
<mml:segment id="0" cable="0" name="Soma">
<mml:proximal y="0" x="0" z="0" diameter="318.309886184"/>
<mml:distal y="0" x="0" z="100" diameter="318.309886184"/>
</mml:segment>
</mml:segments>
<mml:cables>
<mml:cable id="0" name="Soma">
<meta:group>all</meta:group>
</mml:cable>
</mml:cables>
<biophysics units="Physiological Units">
<bio:mechanism type="Channel Mechanism" name="IandF_cellA"/>
<bio:mechanism type="Channel Mechanism" name="pas_cellA">
<bio:parameter name="gmax" value="5e-05">
<bio:group>all</bio:group>
</bio:parameter>
</bio:mechanism>
<bio:specificCapacitance>
<bio:parameter value="1.">
<bio:group>all</bio:group>
</bio:parameter>
</bio:specificCapacitance>
<bio:specificAxialResistance>
<bio:parameter value="0.1">
<bio:group>all</bio:group>
</bio:parameter>
</bio:specificAxialResistance>
<bio:initialMembPotential>
<bio:parameter value="-65.0">
<bio:group>all</bio:group>
</bio:parameter>
</bio:initialMembPotential>
<net:potentialSynapticLocation>
<net:synapse_type>ExcitatorySynapse_cellA</net:synapse_type>
<net:synapse_direction>preAndOrPost</net:synapse_direction>
<net:group>all</net:group>
</net:potentialSynapticLocation>
<net:potentialSynapticLocation>
<net:synapse_type>InhibitorySynapse_cellA</net:synapse_type>
<net:synapse_direction>preAndOrPost</net:synapse_direction>
<net:group>all</net:group>
</net:potentialSynapticLocation>
</biophysics>
</cell>
</cells>
and its synapses would be described like that :
<channels units="Physiological Units">
<cml:ion charge="1" name="non_specific" default_erev="-65.0"/>
<cml:channel_type name="pas_cellA" density="yes">
<meta:notes>Simple example of a leak/passive conductance</meta:notes>
<cml:current_voltage_relation>
<cml:ohmic ion="non_specific">
<cml:conductance default_gmax="5e-05"/>
</cml:ohmic>
</cml:current_voltage_relation>
</cml:channel_type>
<cml:channel_type name="IandF_cellA">
<meta:notes>Spike and reset mechanism</meta:notes>
<cml:current_voltage_relation>
<cml:integrate_and_fire threshold="-50." g_refrac="0.1" t_refrac="5." v_reset="-60."/>
</cml:current_voltage_relation>
</cml:channel_type>
<cml:synapse_type name="ExcitatorySynapse_cellA">
<cml:doub_exp_syn rise_time="5." max_conductance="1.0e-5" reversal_potential="0." decay_time="5.0"/>
</cml:synapse_type>
<cml:synapse_type name="InhibitorySynapse_cellA">
<cml:doub_exp_syn rise_time="10." max_conductance="1.0e-5" reversal_potential="-80." decay_time="5.0"/>
</cml:synapse_type>
</channels>
So the FacetsML/PyNN parameters are translated that way :
'v_rest' -> default_erev in <channels> <cml:ion default_erev=""> 'cm' -> gmax in <cell> <biophysics> <bio:mechanism> <bio:parameter name="gmax" value=""> 'tau_m' -> g_refrac in <channels> <cml:channel_type> <cml:current_voltage_relation> <cml:integrate_and_fire g_refrac=""> 'tau_refrac' -> t_refrac in <channels> <cml:channel_type> <cml:current_voltage_relation> <cml:integrate_and_fire t_refrac=""> 'tau_syn_E' -> decay_time in <channels> <cml:synapse_type name="ExcitatorySynapse_..."> <cml:doub_exp_syn decay_time=""> 'tau_syn_I' -> decay_time in <channels> <cml:synapse_type name="InhibitorySynapse_..."> <cml:doub_exp_syn decay_time=""> 'e_rev_E' -> reversal_potential in <channels> <cml:synapse_type name="ExcitatorySynapse_..."> <cml:doub_exp_syn reversal_potential=""> 'e_rev_I' -> reversal_potential in <channels> <cml:synapse_type name="InhibitorySynapse_..."> <cml:doub_exp_syn reversal_potential=""> 'v_thresh' -> threshold in <channels> <cml:channel_type> <cml:current_voltage_relation> <cml:integrate_and_fire threshold=""> 'v_reset' -> v_reset in <channels> <cml:channel_type> <cml:current_voltage_relation> <cml:integrate_and_fire v_reset=""> 'i_offset' -> something to do with "pas" channel mechanism ? 'v_init' -> value of initialMembPotential in <cell> <biophysics> <bio:initialMembPotential> <bio:parameter value="">

