<?xml version='1.0' encoding='UTF-8'?>
<MorpheusModel version="4">
    <Description>
    <Details>Model ID:	https://identifiers.org/morpheus/M5933
  File type:	Supplementary model
  Software:	Morpheus (open source). Download from: https://morpheus.gitlab.io
Full title:	Patterned Tissue Growth Regulation along Turing Patterns from Gierer-Meinhardt Model
Authors:	B. Kaity, D. Lobo
Submitter:	Y. Korotkyi, G. Börner
Curator:	J. Bürger Michaelis
Date:	07.05.2026
Reference:	This model reproduces a published result, originally obtained with a different simulator:
	B. Kaity, D. Lobo: Emergent stable tissue shapes from the regulatory feedback between morphogens and cell growth. J. Theor. Biol. 620: 112354, 2026.
	https://doi.org/10.1016/j.jtbi.2025.112354</Details>
        <Title>M5933 Patterned Growth Regulation (Labyrinth Pattern)</Title>
    </Description>
    <Space>
        <Lattice class="square">
            <Neighborhood>
                <Order>2</Order>
            </Neighborhood>
            <Size symbol="size" value="600, 600, 0"/>
            <BoundaryConditions>
                <Condition type="constant" boundary="x"/>
                <Condition type="constant" boundary="-x"/>
                <Condition type="constant" boundary="y"/>
                <Condition type="constant" boundary="-y"/>
            </BoundaryConditions>
        </Lattice>
        <SpaceSymbol symbol="space"/>
    </Space>
    <Time>
        <StartTime value="0"/>
        <StopTime value="10000"/>
        <TimeSymbol symbol="time"/>
    </Time>
    <Analysis>
        <ModelGraph include-tags="#untagged" format="dot" reduced="false"/>
        <Gnuplotter time-step="20">
            <Terminal name="png" size="1600, 1600, 0"/>
            <Plot title="Cell radius">
                <Cells value="r"/>
            </Plot>
            <Plot title="Activator m1">
                <Cells per-frame-range="true" value="m2">
                    <ColorMap adaptive-range="true">
                        <Color color="dark-blue" value="0.4"/>
                        <Color color="cyan" value="0.7"/>
                    </ColorMap>
                </Cells>
            </Plot>
            <!--    <Disabled>
        <Plot title="Activator m2">
            <Cells value="m2"/>
        </Plot>
    </Disabled>
-->
            <Plot title="Inhibitor m3">
                <Cells value="m3"/>
            </Plot>
            <Plot title="Growth rate g">
                <Cells value="g"/>
            </Plot>
        </Gnuplotter>
        <Gnuplotter time-step="10">
            <Terminal name="png" size="1600, 1600, 0"/>
            <!--    <Disabled>
        <Plot title="Neighbor count">
            <Cells min="0" value="neighbor_count"/>
        </Plot>
    </Disabled>
-->
            <Plot title="Activator m2">
                <Cells max="1" min="0" value="m2">
                    <ColorMap adaptive-range="false">
                        <Color color="dark-blue" value="0"/>
                        <Color color="cyan" value="1"/>
                    </ColorMap>
                </Cells>
            </Plot>
            <!--    <Disabled>
        <Plot title="Inhibitor m3">
            <Cells value="m3"/>
        </Plot>
    </Disabled>
-->
            <!--    <Disabled>
        <Plot title="Growth rate g">
            <Cells value="g"/>
        </Plot>
    </Disabled>
-->
        </Gnuplotter>
        <Logger time-step="10">
            <Input/>
            <Output>
                <TextOutput file-format="csv"/>
            </Output>
            <Plots>
                <Plot time-step="1000">
                    <Style style="points"/>
                    <Terminal terminal="png"/>
                    <X-axis>
                        <Symbol symbol-ref="time"/>
                    </X-axis>
                    <Y-axis>
                        <Symbol symbol-ref="celltype.cell.size"/>
                    </Y-axis>
                </Plot>
            </Plots>
        </Logger>
    </Analysis>
    <CellTypes>
        <CellType name="cell" class="biological">
            <VolumeConstraint target="A0" strength="Lam_V"/>
            <SurfaceConstraint target="1" strength="Lam_S" mode="aspherity"/>
            <!-- Cell radius (state variable, integrated by ODE) -->
            <Property symbol="r" name="Cell radius" value="sqrt(A00/pi)"/>
            <Function symbol="A0" name="Target area">
                <Expression>pi*r^2</Expression>
            </Function>
            <!-- Morphogen concentrations (one scalar per cell, like the paper) -->
            <Property symbol="m2" name="Activator" value="1"/>
            <Property symbol="m3" name="Inhibitor" value="1"/>
            <!-- Reaction terms (Eq. 16, Gierer-Meinhardt) -->
            <Property symbol="reaction_m2" value="0.0"/>
            <Property symbol="reaction_m3" value="0.0"/>
            <Equation symbol-ref="reaction_m2">
                <Expression>Lambda*(q2 + gamma*m2^2/((m3+epsilon)*(1 + delta*m2^2)) - lambda2*m2 - g*m2)</Expression>
            </Equation>
            <Equation symbol-ref="reaction_m3">
                <Expression>Lambda*(q3 + gamma*m2^2 - lambda3*m3 - g*m3)</Expression>
            </Equation>
            <!-- Cell-to-cell diffusion (Eq. 9, paper-faithful)
            alpha_eff = alpha_paper * (A00/pi) is the unit-converted diffusion constant.
            All distances are in pixels; d_eq and d_max are also in pixels. -->
            <Property symbol="D_m2" value="0.0"/>
            <NeighborhoodReporter time-step="0.1">
                <Input scaling="cell" value="if(cell.type == celltype.cell.id&#xa;                       and sqrt((cell.center.x-local.cell.center.x)^2 + (cell.center.y-local.cell.center.y)^2) &lt; d_max,&#xa;                       (alpha2_eff/(pi*local.r^2))&#xa;                       * (d_max - sqrt((cell.center.x-local.cell.center.x)^2 + (cell.center.y-local.cell.center.y)^2)) / (d_max - d_eq)&#xa;                       * (m2 - local.m2),&#xa;                       0)"/>
                <Output symbol-ref="D_m2" mapping="sum"/>
            </NeighborhoodReporter>
            <Property symbol="D_m3" value="0.0"/>
            <NeighborhoodReporter time-step="0.1">
                <Input scaling="cell" value="if(cell.type == celltype.cell.id&#xa;                       and sqrt((cell.center.x-local.cell.center.x)^2 + (cell.center.y-local.cell.center.y)^2) &lt; d_max,&#xa;                       (alpha3_eff/(pi*local.r^2))&#xa;                       * (d_max - sqrt((cell.center.x-local.cell.center.x)^2 + (cell.center.y-local.cell.center.y)^2)) / (d_max - d_eq)&#xa;                       * (m3 - local.m3),&#xa;                       0)"/>
                <Output symbol-ref="D_m3" mapping="sum"/>
            </NeighborhoodReporter>
            <!-- Combined reaction-diffusion ODE system -->
            <System time-step="0.001" solver="Euler [fixed, O(1)]">
                <DiffEqn symbol-ref="m2">
                    <Expression>reaction_m2 + D_m2</Expression>
                </DiffEqn>
                <DiffEqn symbol-ref="m3">
                    <Expression>reaction_m3 + D_m3</Expression>
                </DiffEqn>
            </System>
            <!-- Growth rate (Eq. 10): activator m2 acts as the growth morphogen -->
            <Function symbol="g">
                <Expression>((g_max-g_min)*m2^h/(s^h+m2^h)+g_min)*(c^h/(c^h+(neighbor_count*1.2)^h))</Expression>
            </Function>
            <!-- Cell radius growth (Eq. 11): dr/dt = g*r/2 -->
            <System time-step="1.0" name="Cell growth" solver="Euler [fixed, O(1)]">
                <DiffEqn symbol-ref="r">
                    <Expression>g*r/2</Expression>
                </DiffEqn>
            </System>
            <!-- Mitosis when cell volume reaches 2*A00 -->
            <CellDivision division-plane="random">
                <Condition>cell.volume >= 2*A00</Condition>
                <Triggers>
                    <Rule symbol-ref="r">
                        <Expression>sqrt(cell.volume/pi)</Expression>
                    </Rule>
                </Triggers>
            </CellDivision>
            <!-- Apoptosis when cell shrinks below half target -->
            <CellDeath>
                <Condition>cell.volume &lt;= A00/2</Condition>
            </CellDeath>
            <!-- Neighbor count for crowding inhibition -->
            <Property symbol="neighbor_count" value="0.0"/>
            <NeighborhoodReporter time-step="0.1">
                <Input scaling="cell" value="if(cell.type == celltype.cell.id&#xa;                       and sqrt((cell.center.x-local.cell.center.x)^2 + (cell.center.y-local.cell.center.y)^2) &lt; d_max,&#xa;                       1,&#xa;                       0)"/>
                <Output symbol-ref="neighbor_count" mapping="sum"/>
            </NeighborhoodReporter>
        </CellType>
        <CellType name="Medium" class="medium">
            <Constant symbol="m2" value="0.0"/>
            <Constant symbol="m3" value="0.0"/>
            <Constant symbol="g" value="0.0"/>
            <Constant symbol="r" value="0.0"/>
        </CellType>
    </CellTypes>
    <CPM>
        <Interaction>
            <Contact type2="cell" type1="cell" value="-0.05"/>
        </Interaction>
        <ShapeSurface scaling="norm">
            <Neighborhood>
                <Order>optimal</Order>
            </Neighborhood>
        </ShapeSurface>
        <MonteCarloSampler stepper="edgelist">
            <MCSDuration value="0.1"/>
            <MetropolisKinetics temperature="0.01"/>
            <Neighborhood>
                <Order>optimal</Order>
            </Neighborhood>
        </MonteCarloSampler>
    </CPM>
    <CellPopulations>
        <Population type="cell" name="Initial cell" size="0">
            <InitCellObjects mode="distance">
                <Arrangement repetitions="2, 1, 0" displacements="2*sqrt(A00/pi), 2*sqrt(A00/pi), 0">
                    <Sphere center="size.x/2, size.y/2, 0" radius="sqrt(A00/pi)"/>
                </Arrangement>
            </InitCellObjects>
        </Population>
    </CellPopulations>
    <Global>
        <!-- ============== GEOMETRY ============== -->
        <Constant symbol="A00" value="40"/>
        <!-- target cell area in pixels -->
        <Constant symbol="Lam_V" name="Volume strength" value="0.1"/>
        <Constant symbol="Lam_S" name="Surface strength" value="0.1"/>
        <!-- Interaction distances (in pixels)
        Paper convention: d_eq = 2*r, d_max = 1.5*d_eq = 3*r -->
        <Constant symbol="d_eq" value="2*sqrt(A00/pi)"/>
        <Constant symbol="d_max" value="3*sqrt(A00/pi)"/>
        <!-- ============== UNIT CONVERSION ============== -->
        <!-- Paper's alpha is in [cell_radius²/time]; convert to [pixel²/time]
        by multiplying by (pixels per cell_radius)² = A00/pi = r² -->
        <Constant symbol="alpha2_paper" value="0.1"/>
        <Constant symbol="alpha3_paper" value="2.0"/>
        <Constant symbol="alpha2_eff" value="alpha2_paper * A00/pi"/>
        <Constant symbol="alpha3_eff" value="alpha3_paper * A00/pi"/>
        <!-- ============== TURING (GIERER-MEINHARDT) ============== -->
        <Constant symbol="q2" value="0"/>
        <!-- basal activator production -->
        <Constant symbol="q3" value="0"/>
        <!-- basal inhibitor production -->
        <Constant symbol="lambda2" value="1.2"/>
        <!-- activator decay -->
        <Constant symbol="lambda3" value="1.0"/>
        <!-- inhibitor decay -->
        <Constant symbol="gamma" value="1.0"/>
        <!-- coupling -->
        <Constant symbol="delta" value="0.4"/>
        <!-- activator saturation -->
        <Constant symbol="Lambda" value="0.05"/>
        <!-- scaling factor (Fig. 12B = filament) -->
        <Constant symbol="epsilon" value="1e-6"/>
        <!-- divide-by-zero guard -->
        <!-- ============== GROWTH ============== -->
        <Constant symbol="g_min" value="-0.01"/>
        <Constant symbol="g_max" value="0.01"/>
        <Constant symbol="s" value="0.5*pi/A00"/>
        <!-- Fig. 12 threshold -->
        <Constant symbol="c" value="6"/>
        <!-- crowding threshold -->
        <Constant symbol="h" value="8"/>
        <!-- Hill coefficient -->
    </Global>
</MorpheusModel>
