This document is about the conversion of an initialy c++ programmed model into a Neosim module. It explains the difference between the original source code and the new source code that uses Neosim interfaces as well as the new programming approach of the model.
Defining a network is then defining its populations and projections :
The attributes of the Grid1DStructure structure are :
The attributes of the Grid3DStructure structure are :
The actual paths for code modules are not explicitely given everytime
a module has to be specified.
The list of modules contain the modules name and location.
Defining the entities
<neuroml class="NeuromlPkg" description="Slow wave sleep cortical network" author="Maxim Bazenhov" keywords="hodgkin-huxley cortical network sleep wave">
<models>
<model name="our_cells" class="CellPkg">
<solutions>
</solutions>
<sectionProperties>
</sectionProperties>
<neurons>
<neuron name="CXcell" class="ModuleNeuron">
<module module="Maximjar">
<parameters class="maxim.CXIN_Neosim" Cell-class="CX_Neosim"
Cell-type="CX"
G_Ampa="0.00015"
G_AmpaMin="0.00015"
G_Nmda="0.00001"
G_GabaA="0.00005"
G_GabaB="0.00000"
G_Ext="-0.010"
h="0.02"/>
</module>
</neuron>
</neurons>
<structures>
</structures>
</model>
</models>
</neuroml>
The tag <neurons> presides for a list of neurons.
The exemple shown here presents only one neuron in this list but there
can be as many as whished.
The neuron defined here by the tag <neuron> is a CX cell.
Its attributes are :
Defining the network
<neuroml class="NeuromlPkg" description="Slow wave sleep cortical network" author="Maxim Bazenhov"
keywords="hodgkin-huxley cortical network sleep wave">
<models>
<model name="the_networks" class="NetworkPkg">
<networks>
<network name="cortical_net">
<elements>
</elements>
<projections>
</projections>
</network>
</networks>
</model>
</models>
</neuroml>
The tag <networks> is a list of
networks, each network being described by a <network ... > tag.
In the current model we define only one network. The attributes of a
network are :
Defining the populations
<neuroml class="NeuromlPkg" description="Slow wave sleep cortical network" author="Maxim Bazenhov" keywords="hodgkin-huxley cortical network sleep wave">
<models>
<model name="the_networks" class="NetworkPkg">
<networks>
<network name="cortical_net">
<elements>
<element name="ExtcellA" elementClass="Extcell">
<structure class="Grid1DStructure" size="1"/>
</element>
<element name="CXcells" elementClass="CXcell">
<structure class="Grid3DStructure" xsize="5" ysize="1" zsize="1"/>
</element>
</elements>
<projections>
</projections>
</network>
</networks>
</model>
</models>
</neuroml>
The list of elements can contain as many populations as
wanted. The attributes of a element are :
The structure of a population can be of many kind according to the needs.
Here are shown two different kinds of structures
used in the current model : the first one
just specifies its number of elements without any spatial
constraints, whereas the second one is an 3D structure
able to emulate a three dimensional array.
Defining the projections
<neuroml class="NeuromlPkg" description="" author="" keywords="">
<models>
<model name="the_networks" class="NetworkPkg">
<networks>
<network name="cortical_net">
<elements>
</elements>
<projections>
<projection name="ExtToIN"
class="ModuleProjection" source="ExtcellB" dest="INcells">
<sourceMethod module="modules.toAllSrc">
<parameters class="tutorial.sourcemethod.SpikeSourceMethod" srcPort="out"/>
</sourceMethod>
<destMethod module="modules.toAllDest">
<parameters class="tutorial.destmethod.SpikeDestMethod" dstPort ="in" delay="2.0"/>
</destMethod>
</projection>
<projection name="CXToCX"
class="ModuleProjection" source="CXCells" dest="CXCells">
<sourceMethod module="modules.Sphere3DSrc">
<parameters class="projection.Sphere3DSrc"
srcPort="out"
autoconnect="false"
boundmethod="mirror"
radius="2"
xrange="2"
yrange="1"
zrange="1"/>
</sourceMethod>
<destMethod module="modules.Sphere3DDst">
<parameters class="projection.Sphere3DDest"
dstPort="in"
delay="2.0"
Cell-type="CX"
</destMethod>
</projection>
</projections>
</network>
</networks>
</model>
</models>
</neuroml>
The projections to be defined are also part of a list, called
projections.
We use here the default projection class which allow to target a
source and a destination method, to which a list of
parameters will be given to properly create the
connections.
The attributes of the ModuleProjection are :
Defining the destination and source methods
The destination and source methods are special links to the modules
Neosim will use to implement the connectivity.
The parameters needed here are :
In the current model, two modules are used that define all the needed kind of projections :
Defining the simulation's controls
<neuroml class="NeuromlPkg" description="Slow wave sleep cortical network" author="Maxim Bazenhov" keywords="hodgkin-huxley cortical network sleep wave">
<models>
</models>
<environment>
<io>
</io>
<schedule class="ControlledSchedule" module="Controljar">
<parameters class="maxim.MaximControl"
pop1name="CXcells"
pop1ODEnumber="13"
pop2name="INcells"
pop2ODEnumber="13"
pop3name="ExtcellA"
pop4name="ExtcellB"
time="150.0"
scaletime="10.0"
printtime="2000.0"
filetime="1000.0"/>
</schedule>
</environment>
<modules>
</modules>
</neuroml>
The simulation environment is defined in this section.
The environement attributes are :
The schedule's default class allows only to set the simulation
duration. The schedule class used here is a
ControlledSchedule giving the control to a code module.
The attributes of the ControlledSchedule are:
Defining the external modules used
<neuroml class="NeuromlPkg" description="" author="" keywords="">
<models>
</models>
<environment>
</environment>
<modules>
<module name="toAllSrc" class="SourceMethodModule"
location="http://www.anc.ed.ac.uk/~paulro/jars/projToAllSrc.jar"/>
<module name="toAllDest" class="DestMethodModule"
location="http://www.anc.ed.ac.uk/~paulro/jars/projToAllDst.jar"/>
<module name="Sphere3DSrc" class="SourceMethodModule"
location="http://www.anc.ed.ac.uk/~paulro/jars/proj3DSphereSrc.jar"/>
<module name="Sphere3DDst" class="DestMethodModule"
location="http://www.anc.ed.ac.uk/~paulro/jars/proj3DSphereDst.jar"/>
<module name="Maximjar" location="http://www.anc.ed.ac.uk/~paulro/jars/maxim.jar"/>
<module name="Controljar" class="ControlModule" location="http://www.anc.ed.ac.uk/~paulro/jars/mcontrol.jar"/>
</modules>
</neuroml>
Instead a reference is
given, targeting a module name placed in a module
list.