NeuroML / org.neuroml.export

Export from NeuroML & LEMS
http://neuroml.org
GNU Lesser General Public License v3.0
8 stars 10 forks source link

feat(neuron-writer): use `Meta` to allow use of cvode #105

Closed sanjayankur31 closed 1 year ago

pgleeson commented 1 year ago

@sanjayankur31 Merging to experimental to test

pgleeson commented 1 year ago

@sanjayankur31 Is there an example of a LEMS file commited somewhere using this?

sanjayankur31 commented 1 year ago

Not yet, I had tweaked one of the example files to test it out:

<Lems>

    <!-- 

        This LEMS file has been automatically generated using PyNeuroML v1.0.8 (libNeuroML v0.5.3)

     -->

    <!-- Specify which component to run -->
    <Target component="HHSim" reportFile="report.txt"/>

    <!-- Include core NeuroML2 ComponentType definitions -->
    <Include file="Cells.xml"/>
    <Include file="Networks.xml"/>
    <Include file="Simulation.xml"/>

    <Include file="NML2_SingleCompHHCell.nml"/>
    <Include file="NaConductance.channel.nml"/>
    <Include file="KConductance.channel.nml"/>
    <Include file="LeakConductance.channel.nml"/>

    <Simulation id="HHSim" length="500ms" step="0.05ms" target="net1" seed="12345">  <!-- Note seed: ensures same random numbers used every run -->
        <Meta for="neuron" method="cvode" abs_tolerance="0.0001" rel_tolerance="0.001" />

        <Display id="display0" title="Voltages" timeScale="1ms" xmin="-50.0" xmax="550.0" ymin="-90" ymax="50">
            <Line id="v" quantity="hhpop[0]/v" scale="1mV" color="#ffffff" timeScale="1ms"/>
        </Display>

        <OutputFile id="Volts_file" fileName="HHSim.v.dat">
            <OutputColumn id="v" quantity="hhpop[0]/v"/> 
        </OutputFile>

        <EventOutputFile id="Events_file" fileName="HHSim.v.spikes" format="ID_TIME">
            <EventSelection id="0" select="hhpop[0]" eventPort="spike"/> 
        </EventOutputFile>

    </Simulation>

</Lems>

This is the bit that needs adding to any existing LEMS file:

<Meta for="neuron" method="cvode" abs_tolerance="0.0001" rel_tolerance="0.001" />