<MorpheusModel version="1">
    <Description>
        <Title>Chemotaxis2D</Title>
    </Description>
    <Space>
        <Lattice class="square">
            <Size symbol="s" value="100 100 0"/>
            <BoundaryConditions>
                <Condition boundary="x" type="noflux"/>
                <Condition boundary="y" type="noflux"/>
            </BoundaryConditions>
            <Neighborhood>
                <Order>2</Order>
            </Neighborhood>
        </Lattice>
        <SpaceSymbol symbol="l"/>
    </Space>
    <Time>
        <StartTime value="0"/>
        <StopTime value="1e4"/>
    </Time>
    <CellTypes>
        <CellType class="biological" name="cells">
            <Property symbol="neighbors" value="0" name="number of neighboring cells"/>
            <VolumeConstraint>
                <Strength value="1"/>
                <Target value="1"/>
            </VolumeConstraint>
            <SurfaceConstraint>
                <Strength value="1.0"/>
                <Target value="0.85"/>
            </SurfaceConstraint>
            <Chemotaxis>
                <Layer symbol-ref="U"/>
                <Strength value="100"/>
            </Chemotaxis>
        </CellType>
        <CellType class="medium" name="medium">
            <Property symbol="p" value="0" name="production chemoattractant"/>
            <Property symbol="cell" value="0"/>
        </CellType>
    </CellTypes>
    <CPM>
        <Interaction default="0.0">
            <Contact type1="cells" type2="medium" value="0"/>
            <Contact type1="cells" type2="cells" value="-20"/>
        </Interaction>
        <MetropolisKinetics temperature="10.0" stepper="edgelist">
            <Neighborhood>
                <Order>2</Order>
            </Neighborhood>
        </MetropolisKinetics>
        <MCSDuration value="1.0"/>
    </CPM>
    <PDE>
        <Layer symbol="U" name="chemoattractant">
            <Diffusion rate="0"/>
            <Initial>
                <InitPDEExpression>
                    <Expression>exp(1- ( (( l.x-((s.x + 1) / 2))^2)/(2*sigma)^2  + (( l.y-((s.y + 1) / 2) )^2)/(2*sigma)^2 ))</Expression>
                </InitPDEExpression>
            </Initial>
        </Layer>
        <Constant symbol="sigma" value="10" name="sigma"/>
    </PDE>
    <CellPopulations>
        <Population size="100" type="cells" name="Cells">
            <InitRectangle displacement="10" cells="50" type="regular">
                <Dimensions size="100 100 0" origin="0 0 0"/>
            </InitRectangle>
        </Population>
    </CellPopulations>
    <Analysis>
        <!--    <Disabled>
        <Gnuplotter clean="true" interval="50">
            <Terminal opacity="0.55" name="png"/>
            <Cells flooding="true" min="0.0" max="5">
                <ColorMap>
                    <Color value="2.0" color="white"/>
                    <Color value="0" color="black"/>
                </ColorMap>
            </Cells>
            <PDE symbol-ref="U"/>
        </Gnuplotter>
    </Disabled>
-->
        <Logger interval="50">
            <Format string="cell.center.x cell.center.y"/>
            <Input>
                <Cell mapping="all" celltype="cells"/>
            </Input>
            <!--    <Disabled>
        <Plot interval="500" terminal="png" persist="true">
            <X-axis column="1" min="0"/>
            <Y-axis columns="3" min="0"/>
        </Plot>
    </Disabled>
-->
        </Logger>
    </Analysis>
</MorpheusModel>
