<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<SDRun xmlns:xi="http://www.w3.org/2001/XInclude" xmlns="http://stochdiff.textensor.org">
    <!-- this file defines a single run of the calculation, using morphology and 
	 reaction data brought in from other files --> 

          <xi:include href="Rxn_CaPKAsubsetpR.xml" />
          <xi:include href="Morph6.5um.xml" />
	  <xi:include href="IC_CaPKAsubsetpR_6.5u.xml" />       
          <xi:include href="IO_CaPKAsubsetpR.xml" />
    <StimulationSet>
      <InjectionStim specieID="L" injectionSite="pointA">
        <onset>           100000        </onset>
        <duration>           100       </duration>
        <rate>               170.0    </rate>
	<!-- 156.66*1000ms gives 1 uM in 6.5um dia-->
      </InjectionStim>
    </StimulationSet>

    <!--2D means the morphology is interpreted like a flatworm, 3D for
roundworms. The 2D case is good for testing as it is easy to visualize the
results (also, 3D may not work yet).  -->
    
    <geometry>          2D           </geometry>
    <depth2D>           4.0          </depth2D>
    <distribution>      BINOMIAL     </distribution>
    <algorithm>         INDEPENDENT  </algorithm>
    <simulationSeed>    245          </simulationSeed>

    <!-- Run time for the calculation, in milliseconds. -->
    <runtime>400000</runtime>

    <!-- Set the seed to get the same spines each time testing. Use 143, 155, 156 to calculate SEM-->
    <spineSeed>143</spineSeed>

    <discretization>
	<!-- default largest size for elements in bulk volumes (dendrites), microns -->	
       <defaultMaxElementSide>1.0</defaultMaxElementSide> 
        
	<!-- Discretization for spines, in microns. -->
	<spineDeltaX>0.1</spineDeltaX>

    <!-- This specifies the surface layers, first implemented in v.2.1.7 -->
    <surfaceLayers>0.25,0.5</surfaceLayers>

	<!-- Override the default for a particular region. -->
	<!-- Matches against id or regionClass in the morphology file. -->
<!--
        <MaxElementSide region="PSD">0.1</MaxElementSide>
-->
    </discretization>

    <!-- The timestep used in fixed step calculations, in milliseconds -->
    <fixedStepDt>0.005</fixedStepDt>

    <!-- Epsilong for adaptive -->
    <tolerance>0.01</tolerance>

    <outputInterval>1000</outputInterval>

    <!-- Calculation types include GRID_STEPPED_STOCHASTIC and GRID_STEPPED_CONTINUOUS for 
	 reaction-diffusion systems. Single mixed pool calculations should be listed here too (TODO) -->
    <calculation>GRID_STEPPED_STOCHASTIC</calculation>

</SDRun>