Detoxification and Liver Injury from Acetaminophen (APAP)

Persistent Identifier

Use this permanent link to cite or share this Morpheus model:

This multiscale mechanistic liver lobule model is composed of various interacting cell types, such as hepatocytes, residential Kupffer cells and macrophages. It captures hepatocellular acetaminophen (APAP) metabolism, DNA damage response activation, necrotic cell death, macrophage recruitment and the regulation of hepatocellular senescence and proliferation, with qualitatively different outcomes as a function of the initial APAP concentration in blood plasma.

This model also requires the separate file hexagon_200.tif.

Introduction

The human liver is a major organ of metabolism, is approximately 15 centimeters long and weighs about 1.5 kilograms. It is subdivided into lobes and further into thousands of hexagonal columns, called lobules, which act in parallel. The cross-section of one lobule is shown in Fig. 1a below. 80 % of the lobule volume are occupied by hepatocytes (brown in model figures) that process metabolites from the blood in a spatially cascaded way along the sinusoids, which are blood capillaries running from portal veins (PV, red, in the corners of the lobule) to the central vein (CV, large red circle in Fig. 1a). Further cells are residential Kupffer cells (small blue in model figures) and macrophages (green in model figures). Empty, white space in the model represents other non-parenchymal cells, such as sinusoidal epithelial cells and stellate cells, and intercellular spaces.

**Fig. 1:** Schema of liver lobule geometry and APAP metabolism from [Fig. 1](https://www.nature.com/articles/s41540-022-00238-5/figures/1) ([*CC BY 4.0*](https://creativecommons.org/licenses/by/4.0/): [**Heldring _et al._**](#reference))
Fig. 1: Schema of liver lobule geometry and APAP metabolism from Fig. 1 (CC BY 4.0: Heldring et al.)

Pericentral (near CV) hepatocytes are specialized for glycolysis, lipogenesis and cytochrome P450-based drug detoxification. Thus the pericentral hepatocytes are most sensitive to NAPQI production and DNA damage in acetaminophen (APAP) toxicity, see Fig. 1b. Hepatocytes die, are cleared by infiltrating macrophages in response to signals by Kupffer cells and hepatocytes start regenerating over the course of one week after APAP uptake, as shown in the model simulation movie below.

Video: Simulation results of the reference model, published as Suppl. Movie 1. Time is running at the bottom with a unit of $5\ \mathrm{min}$. The total duration corresponds to one week. The color code is red for CV and PVs; brown, healthy hepatocytes; orange, proliferated hepatocytes; gray, senescent hepatocytes; black, necrotic hepatocytes; green, macrophages; blue, Kupffer cells. (CC BY 4.0: Heldring et al.).

Model Description

The CPM is used to model the interacting cell types hepatocytes, residential Kupffer cells and macrophages. PDEs and ODEs are used to model APAP distribution and hepatocellular metabolism, necrotic cell death and macrophage recruitment, DNA damage response activation and the regulation of senescence and proliferation.

Space is discretized as a 2D square lattice with $3\ \mathrm{\mu m}$ lattice spacing. All parameter values are scaled to that space unit of $3\ \mathrm{\mu m}$. Time unit is $5\ \mathrm{min}$. One Monte Carlo step (MCS) is set to $0.00675$ time units. The total simulation duration of $2112$ time units is split into $96$ time units ($= 6\ \mathrm{h}$) for initial equilibration before APAP intake and $2016$ time units ($= 168\ \mathrm{h}$, denoted as real time in graphs) of detoxification and damage response.

The published model was developed with Morpheus version 2.2.0 and the here provided and accelerated model was run in the newer Morpheus version 2.3.3 and is being tested with each latest version of Morpheus.

Below, both model files are shared:

  1. model_published.xml ( | ), published as 08_Mouseliver_default.xml and running in Morpheus version 2.2.0
  2. model.xml ( | ), which is running in the latest version of Morpheus

The following updates were applied to the published model file to arrive at model.xml:

  • Explicitly set the duration of one MCS to mcs_duration $= 0.00675$ as it was implicitly set by Morpheus 2.2.0
  • Explicitly set the time steps of NeighborhoodReporters and Plugin propensities to match the originally applied propensities
  • Reordered two statements in CellType hepatocytes to simplify initialization
  • Deleted previously disabled CellPopulations to reduce file size
  • To speed up runtime and maintain accuracy and original results, the solver settings for ODEs were adjusted and the time-step of Global:Event ‘Start APAP’ was set to $95$.

Results

The main control parameter of the model is the initial APAP blood plasma concentration and encoded by Pex_start. The upper limit of its useful parameter range is $1000\ \frac{\mathrm{\mu g}}{\mathrm{ml}}$. Below, the model is evaluated for a concentration of $500\ \frac{\mathrm{\mu g}}{\mathrm{ml}}$ ($\approx 10$-fold higher than a typical human dose).

**Fig. 2:** Schema of intercellular signaling (a) and time courses of cell counts (b) as published in [Fig. 2](https://www.nature.com/articles/s41540-022-00238-5/figures/2) ([*CC BY 4.0*](https://creativecommons.org/licenses/by/4.0/): [**Heldring _et al._**](#reference)). The reproduced time course from the updated model in Morpheus version 2.3.3 is shown in (c). Individual stochastic simulations differ slightly as expected.
Fig. 2: Schema of intercellular signaling (a) and time courses of cell counts (b) as published in Fig. 2 (CC BY 4.0: Heldring et al.). The reproduced time course from the updated model in Morpheus version 2.3.3 is shown in (c). Individual stochastic simulations differ slightly as expected.

Video: This movie shows simulation results of the updated model.xml ( | ) with Morpheus version 2.3.3, corresponding to the time courses shown in Fig. 2c above, and reproducing Suppl. Movie 1, shown at the beginning. Also the color code is the same as in the movie above.

Reference

This model is the original used in the publication, up to technical updates:

M. M. Heldring, A. H. Shaw, J. B. Beltman: Unraveling the effect of intra- and intercellular processes on acetaminophen-induced liver injury. NPJ Syst. Biol. Appl. 8: 27, 2022.

Model

Get this model via:

  • Morpheus-Link or
  •  Download: model.xml
  • XML Preview

    <?xml version='1.0' encoding='UTF-8'?>
    <MorpheusModel version="4">
        <Time>
            <StartTime value="0"/>
            <StopTime value="2112"/>
            <TimeSymbol symbol="time" name="time"/>
            <RandomSeed value="555213149"/>
        </Time>
        <Description>
            <Title>Heldring2022</Title>
            <Details>Full title:	Unraveling the effect of intra- and intercellular processes on acetaminophen-induced liver injury
    Authors:	M. M. Heldring, A. H. Shaw, J. B. Beltman
    Curators:	L. Brusch
    Date:	07.03.2023
    Software:	Morpheus (open source). Download from: https://morpheus.gitlab.io
    Model ID:	https://identifiers.org/morpheus/M9496
    Units:	[time] = 5 min
    	[space] = 3 µm
    Reference:	This model is the original used in the publication, up to technical updates:
    	M. M. Heldring, A. H. Shaw, J. B. Beltman: Unraveling the effect of intra- and intercellular processes on acetaminophen-induced liver injury. npj Systems Biology and Applications 8: 27, 2022.
    	https://doi.org/10.1038/s41540-022-00238-5
    Comment by the authors:	maximum of useful parameter range for Pex_start (APAP dose) is 1000 µg/ml
    </Details>
        </Description>
        <Space>
            <SpaceSymbol symbol="l" name="location"/>
            <Lattice class="square">
                <Size symbol="size" value="200, 200, 0"/>
                <BoundaryConditions>
                    <Condition type="constant" boundary="x"/>
                    <Condition type="constant" boundary="y"/>
                </BoundaryConditions>
                <Neighborhood>
                    <Order>2</Order>
                </Neighborhood>
                <Domain boundary-type="noflux">
                    <Image path="hexagon_200.tif"/>
                </Domain>
                <NodeLength symbol="um" value="3"/>
            </Lattice>
        </Space>
        <Global>
            <Field symbol="M" name="MCP-1" value="0.0">
                <Diffusion rate="250"/>
            </Field>
            <Field symbol="Pex" name="mg/L IV Paracetamol" value="0">
                <Diffusion rate="0" well-mixed="true"/>
            </Field>
            <Field symbol="MIT" name="mitogens" value="0.0">
                <Diffusion rate="250"/>
            </Field>
            <Field symbol="T" name="TGF-beta" value="0.0">
                <Diffusion rate="2"/>
            </Field>
            <System time-step="1.0" name="System ODEs" solver="Heun [fixed, O(2)]">
                <DiffEqn symbol-ref="Pex">
                    <Expression>- ku * Plocal - ke * Pex</Expression>
                </DiffEqn>
                <DiffEqn symbol-ref="M" name="MCP-1 synthesis">
                    <Expression>rM - dM * M</Expression>
                </DiffEqn>
                <DiffEqn symbol-ref="T" name="TGF-beta">
                    <Expression>T_macro + T_senescence - T_local * R * kon_t + koff_t * RT - T * dT</Expression>
                </DiffEqn>
                <DiffEqn symbol-ref="MIT">
                    <Expression>rmit - dmit * MIT</Expression>
                </DiffEqn>
                <DiffEqn symbol-ref="D" name="ODE for DAMP release">
                    <Expression>rD - dD * D</Expression>
                </DiffEqn>
                <DiffEqn symbol-ref="Efflux" name="efflux of unchanged APAP">
                    <Expression>ke * Pex</Expression>
                </DiffEqn>
                <DiffEqn symbol-ref="Uptake" name="APAP uptake">
                    <Expression>ku * Plocal</Expression>
                </DiffEqn>
            </System>
            <Mapper name="Sum Macrophages">
                <Input value="celltype.macrophages.id>0"/>
                <Output symbol-ref="macro_sum" mapping="sum"/>
            </Mapper>
            <Mapper name="Average MCP-1">
                <Input value="M"/>
                <Output symbol-ref="M_mean" mapping="average"/>
            </Mapper>
            <Variable symbol="proliferating" value="0.0"/>
            <Constant symbol="rM" name="MCP-1 release rate" value="0.0"/>
            <Constant symbol="dmit" name="Mitogen degradation rate" value="0.27"/>
            <Constant symbol="dM" name="degradation of MCP1" value="0.2"/>
            <Event time-step="95.0" name="Start APAP">
                <Condition>time>94.99</Condition>
                <Rule symbol-ref="Pex" name="APAP exposure as plasma concentration">
                    <Expression>Pex_start</Expression>
                </Rule>
            </Event>
            <Constant symbol="rD" name="DAMP release rate by necrotic cells" value="0.0"/>
            <Constant symbol="dD" name="degradation of DAMPs" value="0.1"/>
            <Field symbol="D" name="DAMP concentration" value="0.0">
                <Diffusion rate="2"/>
            </Field>
            <Field symbol="portal_area" name="portal area" value="0"/>
            <NeighborhoodReporter time-step="1.0" name="portal area">
                <Input value="cell.type == celltype.PV.id"/>
                <Output symbol-ref="portal_area" mapping="average"/>
            </NeighborhoodReporter>
            <!--    <Disabled>
            <NeighborhoodReporter name="periportal area">
                <Input value="if(portal_area>0 &amp;&amp; portal_area&lt;0.7,1,0)"/>
                <Output symbol-ref="periportal_area" mapping="discrete"/>
            </NeighborhoodReporter>
        </Disabled>
    -->
            <Field symbol="periportal_area" name="periportal area" value="0.0"/>
            <Constant symbol="dT" name="degradation rate of TGF-beta" value="0.3"/>
            <Variable symbol="T_senescence" name="TGF-beta produced by senescent cells" value="0.0"/>
            <Variable symbol="T_local" name="TGF-beta concentrations in hepatocytes" value="0.0"/>
            <Constant symbol="kon_t" name="Binding rate of TGF-beta to the receptor" value="0.25"/>
            <Constant symbol="koff_t" name="Dissociation rate of TGF-beta from the receptor" value="0.5"/>
            <Variable symbol="RT" name="Occupied TGF-B receptor" value="0.0"/>
            <Constant symbol="ku" name="APAP uptake by hepatocytes" value="0.04"/>
            <Constant symbol="ke" name="APAP efflux through Central Vein" value="0.00075"/>
            <Variable symbol="R" name="Free/unbound TGF-B receptor" value="0.0"/>
            <Constant symbol="radius" name="radius for cell placement" value="80"/>
            <Variable symbol="T_macro" name="TGF-beta produced by macrophages" value="0.0"/>
            <Variable symbol="Plocal" name="" value="0.0"/>
            <Variable symbol="rmit" name="Release rate of mitogens" value="0.0"/>
            <Variable symbol="M_local" name="Local MCP1 concentration" value="0.0"/>
            <Variable symbol="M_mean" name="MCP-1 mean" value="0.0"/>
            <Variable symbol="macrophages_total" name="Macrophages" value="0.0"/>
            <Variable symbol="kupffer_total" name="Kupffer" value="0.0"/>
            <Variable symbol="hepatocytes_total" name="Hepatocytes (total)" value="0.0"/>
            <Variable symbol="necrotic_total" name="Necrotic" value="0.0"/>
            <Variable symbol="macro_sum" value="0.0"/>
            <Function symbol="real_time">
                <Expression>(time-96)/12</Expression>
            </Function>
            <Mapper name="Average APAP">
                <Input value="Pex"/>
                <Output symbol-ref="Pex_mean" mapping="average"/>
            </Mapper>
            <Variable symbol="Pex_mean" name="APAP mean" value="0.0"/>
            <Mapper name="Average DAMP">
                <Input value="D"/>
                <Output symbol-ref="D_mean" mapping="average"/>
            </Mapper>
            <Variable symbol="MIT_mean" name="Mitogen mean" value="0.0"/>
            <Variable symbol="D_mean" name="DAMP mean" value="0.0"/>
            <Variable symbol="T_mean" name="TGFB mean" value="0.0"/>
            <Mapper name="TGFB mean">
                <Input value="T"/>
                <Output symbol-ref="T_mean" mapping="average"/>
            </Mapper>
            <Mapper name="Mitogen mean">
                <Input value="MIT"/>
                <Output symbol-ref="MIT_mean" mapping="average"/>
            </Mapper>
            <Constant symbol="dimension" name="Number of pixels in x or y direction/2" value="100.0"/>
            <Constant symbol="cellvolume" name="cell volume of hepatocytes" value="35"/>
            <Variable symbol="C_mean" name="Mean NAPQI-protein in perivenous area" value="0.0"/>
            <Variable symbol="oxidation_total" name="Total amount of oxidation" value="0.0"/>
            <Variable symbol="glucu_sulf_total" name="Total amount of glucuronidation and sulfation" value="0.0"/>
            <Variable symbol="volume_tot_hep" name="Total hepatocyte volume" value="0.0"/>
            <Variable symbol="volume_tot_kupf" name="Total kuppfer cell volume" value="0.0"/>
            <Variable symbol="P_pv_local" name="" value="0.0"/>
            <Variable symbol="P_max" name="Maximum APAP in field" value="0.0"/>
            <Variable symbol="Pin_total" name="Total intracellular APAP" value="0.0"/>
            <Variable symbol="N_max" name="Max NAPQI" value="0.0"/>
            <Variable symbol="NG_max" name="Max NAPQI-GSH complex" value="0.0"/>
            <Variable symbol="G_min" name="Minimum GSH" value="0.0"/>
            <Variable symbol="C_max" name="Maximum NAPQI-protein complex" value="0.0"/>
            <Variable symbol="G_max" name="Maximum GSH" value="0.0"/>
            <System name="Percentages" solver="Dormand-Prince [adaptive, O(5)]">
                <Rule symbol-ref="Perc_gluc_sulf" name="Percentage_gluc">
                    <Expression>if(glucu_sulf_total>0 or oxidation_total > 0,(glucu_sulf_total/(glucu_sulf_total+oxidation_total))*100,0)</Expression>
                </Rule>
                <Rule symbol-ref="Perc_oxidation" name="Percentage oxidation">
                    <Expression>if(glucu_sulf_total>0 or oxidation_total > 0,(oxidation_total/(glucu_sulf_total+oxidation_total))*100,0)</Expression>
                </Rule>
                <Rule symbol-ref="efflux_perc">
                    <Expression>if(efflux_total>0 or uptake_total > 0,(efflux_total/(efflux_total+uptake_total))*100,0)</Expression>
                </Rule>
                <Rule symbol-ref="uptake_perc">
                    <Expression>if(efflux_total>0 or uptake_total > 0,(uptake_total/(efflux_total+uptake_total))*100,0)</Expression>
                </Rule>
            </System>
            <Variable symbol="Perc_oxidation" name="Percentage of oxidation" value="0.0"/>
            <Variable symbol="Perc_gluc_sulf" name="Percentage of glucuronidation and sulfation" value="0.0"/>
            <Variable symbol="senescent_total" name="Senescent" value="0.0"/>
            <Field symbol="Efflux" name="APAP efflux" value="0.0"/>
            <Field symbol="Uptake" name="APAP uptake by hepatocytes" value="0.0"/>
            <Mapper time-step="1.0" name="Total efflux">
                <Input value="Efflux"/>
                <Output symbol-ref="efflux_total" mapping="sum"/>
            </Mapper>
            <Variable symbol="efflux_total" name="Total efflux" value="0.0"/>
            <Variable symbol="uptake_total" name="Total uptake" value="0.0"/>
            <Mapper time-step="1.0" name="Total uptake">
                <Input value="Uptake"/>
                <Output symbol-ref="uptake_total" mapping="sum"/>
            </Mapper>
            <Variable symbol="efflux_perc" name="Percentage of APAP efflux" value="0"/>
            <Variable symbol="uptake_perc" name="Percentage uptake" value="0"/>
            <Variable symbol="M_pp" name="MCP-1 in periportal area" value="0.0"/>
            <Constant symbol="Pex_start" name="Initial APAP concentration (mg/L)" value="500"/>
            <Mapper time-step="1.0" name="periportal area">
                <Input value="if(portal_area>0 &amp;&amp; portal_area&lt;0.5,1,0)"/>
                <Output symbol-ref="periportal_area"/>
            </Mapper>
            <!--    <Disabled>
            <Field symbol="binary" name="binary" value="0.0"/>
        </Disabled>
    -->
            <!--    <Disabled>
            <Mapper name="portal binary">
                <Input value="if(cell.type == celltype.PV.id,1,0)"/>
                <Output symbol-ref="binary" mapping="sum"/>
            </Mapper>
        </Disabled>
    -->
            <Variable symbol="sulf_total" name="Total sulfation" value="0.0"/>
            <Variable symbol="gluc_total" name="Total glucuronidation" value="0.0"/>
            <Variable symbol="switch" value="0.0"/>
            <System time-step="1.0" name="Macrophage switch" solver="Heun [fixed, O(2)]">
                <Rule symbol-ref="switch">
                    <Expression>if(macrophages_total > 100,switch+1,switch+0)</Expression>
                </Rule>
            </System>
            <Variable symbol="alltime_M_pp_max" name="all time maximum of MCP-1 in periportal area" value="0.0"/>
            <System time-step="1.0" solver="Heun [fixed, O(2)]">
                <Rule symbol-ref="alltime_M_pp_max">
                    <Expression>if(M_pp > alltime_M_pp_max, M_pp, alltime_M_pp_max)</Expression>
                </Rule>
            </System>
        </Global>
        <CellTypes>
            <CellType class="biological" name="CV">
                <FreezeMotion>
                    <Condition>1</Condition>
                </FreezeMotion>
                <Property symbol="celltype" name="cell type" value="3"/>
                <Mapper name="Local APAP concentration">
                    <Input value="Pex"/>
                    <Output symbol-ref="P_cv_local" mapping="average"/>
                </Mapper>
                <Property symbol="P_cv_local" name="Local APAP concentration" value="0.0"/>
            </CellType>
            <CellType class="biological" name="PV">
                <Property symbol="celltype" name="cell type" value="2"/>
                <FreezeMotion>
                    <Condition>1</Condition>
                </FreezeMotion>
                <Mapper name="Local APAP concentration">
                    <Input value="Pex"/>
                    <Output symbol-ref="P_pv_local" mapping="average"/>
                </Mapper>
                <Mapper name="Local MCP1 concentration">
                    <Input value="M"/>
                    <Output symbol-ref="M_pp" mapping="average"/>
                </Mapper>
            </CellType>
            <CellType class="biological" name="hepatocytes">
                <VolumeConstraint target="vc" name="target volume" strength="1"/>
                <Property symbol="celltype" name="cell type" value="1"/>
                <Property symbol="vc" name="cell volume" value="cellvolume"/>
                <Property symbol="RT" name="Occupied TGF-B receptor" value="0.0"/>
                <Property symbol="T_local" value="0.0"/>
                <Property symbol="T_senescence" value="0.0"/>
                <Property symbol="Plocal" name="Local APAP concentration" value="0.0"/>
                <Property symbol="Pin" name="Intracellular P concentration" value="0.0"/>
                <Property symbol="C" name="Protein-NAPQI complex" value="0.0"/>
                <Property symbol="N" value="0.0"/>
                <Property symbol="p53" name="p53 concentration " value="0.204"/>
                <Property symbol="p53p" name="p53p concentration" value="0"/>
                <Property symbol="p21" name="p21 concentration" value="4.68634"/>
                <Property symbol="MDM2" name="MDM2 protein" value="0.26255"/>
                <Property symbol="distance" name="distance from CV at t=0" value="sqrt(((cell.center.x-dimension)^2)+((cell.center.y-dimension)^2))"/>
                <Property symbol="distance_normal" name="normalized distance from CV at t=0" value="(distance/radius)"/>
                <Property symbol="NG" name="NAPQI-GSH complex" value="0.0"/>
                <Property symbol="sulf" name="Sulfation (90%)" value="0.0"/>
                <Property symbol="K" name="Cyclin/CDK" value="4.68634"/>
                <Property symbol="S" name="PAPS enzymes for sulfation" value="bs / ds"/>
                <!--    <Disabled>
            <Property symbol="P450_local" value="(1/(1+exp(b*(distance_normal-a))))"/>
        </Disabled>
    -->
                <Property symbol="P450_cell" name="cellular Cytochrome P450 abundance" value="(d_p450+(1/(1+exp(b*(distance_normal-a)))))/c_p450"/>
                <Property symbol="G_cell" name="intracellular GSH" value="(d_gsh+(1/(1+exp(-b*(distance_normal-a)))))/c_gsh"/>
                <Property symbol="neighb_nec" value="0.0"/>
                <Property symbol="p_proliferation" name="chance of proliferation" value="0.001"/>
                <Property symbol="M_local" name="local concentration of MCP-1" value="0.0"/>
                <Property symbol="MIT_local" name="local mitogen concentration" value="0.0"/>
                <Property symbol="p_necrosis" name="chance of necrosis" value="0.8"/>
                <Property symbol="necrosis" value="0.0"/>
                <Property symbol="c_time" value="0.0"/>
                <Property symbol="senescence" value="0.0"/>
                <Property symbol="nt_hepmacro" value="0.0"/>
                <Property symbol="neigh_hepmacro" value="0.0"/>
                <Property symbol="divisions" name="number of divisions" value="0.0"/>
                <!--    <Disabled>
            <Property symbol="GSH_deg" name="basal GSH production rate" value="GSH_basal / GSH_dist"/>
        </Disabled>
    -->
                <Constant symbol="dGSH" name="GSH degradation rate" value="0.006944444"/>
                <Constant symbol="kg" name="rate of glucuronidation" value="0.010381944"/>
                <Constant symbol="ds" name="PAPS degradation rate" value="0.006944444"/>
                <Constant symbol="kP450" name="APAP conversion rate to NAPQI by CYT P450" value="0.00109375"/>
                <Constant symbol="kN" name="conversion rate of NAPQI to APAP" value="0.000109375"/>
                <Constant symbol="ks" name="rate of sulfation" value="0.0010381944"/>
                <Constant symbol="bs" name="Basal PAPS production" value="0.0694444"/>
                <!--    <Disabled>
            <Constant symbol="kGSH" name="rate of NAPQI binding to GSH" value="0.05"/>
        </Disabled>
    -->
                <!--    <Disabled>
            <Constant symbol="kpsh" name="rate of NAPQI-protein complex formation" value="0.3819444"/>
        </Disabled>
    -->
                <Constant symbol="b" name="distance constant b" value="10"/>
                <Constant symbol="a" name="distance constant a" value="0.5"/>
                <System time-step="0.05" name="Cell ODEs" time-scaling="1.0" solver="Runge-Kutta [fixed, O(4)]">
                    <DiffEqn symbol-ref="Pin" name="intracellular APAP ODE">
                        <Expression>ku * Plocal - Pin * kP450 * P450_cell - Pin * kg - ks * S * Pin + N * kN</Expression>
                    </DiffEqn>
                    <DiffEqn symbol-ref="N" name="NAPQI ODE">
                        <Expression>Pin * kP450 * P450_cell - N * kGSH * G_cell - N * kpsh - N * kN</Expression>
                    </DiffEqn>
                    <DiffEqn symbol-ref="RT" name="TGFB_bound ODE">
                        <Expression>T_local * R * kon_t - koff_t * RT</Expression>
                    </DiffEqn>
                    <DiffEqn symbol-ref="C" name="NAPQI-protein complex ODE">
                        <Expression>N * kpsh - C * dc</Expression>
                    </DiffEqn>
                    <DiffEqn symbol-ref="p53">
                        <Expression>ks_p53 + k_dp * p53p - k_p * p53 * C - kd_p53 * p53 - kd_p53_mdm2 * MDM2 * p53</Expression>
                    </DiffEqn>
                    <DiffEqn symbol-ref="p53p" name="">
                        <Expression>k_p * p53 * C - k_dp * p53p - kd_p53p * p53p - kd_p53p_mdm2 * MDM2 * p53p</Expression>
                    </DiffEqn>
                    <DiffEqn symbol-ref="MDM2">
                        <Expression>ks_mdm2 + (ks_mdm2_p53p * p53p^4) / (Km_mdm2^4 + p53p^4) - kd_mdm2 * MDM2</Expression>
                    </DiffEqn>
                    <DiffEqn symbol-ref="p21">
                        <Expression>ks_p21 + (ks_p21_p53p * p53p^4) / (Km_p21^4 + p53p^4) - kd_p21 * p21 + RT * k_stim</Expression>
                    </DiffEqn>
                    <DiffEqn symbol-ref="G_cell" name="GSH ODE">
                        <Expression>bGSH - dGSH * G_cell - N * kGSH * G_cell</Expression>
                    </DiffEqn>
                    <DiffEqn symbol-ref="K">
                        <Expression>bk + k_mitogen * MIT_local - k_inhibitor * p21 * K - dk * K</Expression>
                    </DiffEqn>
                    <!--    <Disabled>
            <DiffEqn symbol-ref="CD1_bas">
                <Expression>CD1_basal - k_inhibitor * p21 * CD1_bas - CD1_deg * CD1_bas</Expression>
            </DiffEqn>
        </Disabled>
    -->
                    <!--    <Disabled>
            <DiffEqn symbol-ref="CD1_mito">
                <Expression>k_mitogen * M_local - k_inhibitor * p21 * CD1_mito - CD1_deg * CD1_mito</Expression>
            </DiffEqn>
        </Disabled>
    -->
                    <DiffEqn symbol-ref="R" name="receptor binding">
                        <Expression>- T_local * R * kon_t + koff_t * RT</Expression>
                    </DiffEqn>
                    <DiffEqn symbol-ref="NG">
                        <Expression>N * kGSH * G_cell</Expression>
                    </DiffEqn>
                    <DiffEqn symbol-ref="sulf" name="ODE for non-toxic metabolites (gluc and sulf)">
                        <Expression>Pin * ks * S </Expression>
                    </DiffEqn>
                    <DiffEqn symbol-ref="S" name="ODE for sulfation">
                        <Expression>- ks * S * Pin + bs - ds * S</Expression>
                    </DiffEqn>
                    <DiffEqn symbol-ref="gluc">
                        <Expression>kg * Pin</Expression>
                    </DiffEqn>
                </System>
                <!--    <Disabled>
            <System time-step="1.0" name="Cell colour back to normal" solver="Heun [fixed, O(2)]">
                <Rule symbol-ref="c_time">
                    <Expression>if(celltype == 7, c_time +1, 0)</Expression>
                </Rule>
            </System>
        </Disabled>
    -->
                <System time-step="1.0" solver="Heun [fixed, O(2)]">
                    <Rule symbol-ref="nt_hepmacro">
                        <Expression>if(neigh_hepmacro > 0, nt_hepmacro + 1, 0)</Expression>
                    </Rule>
                </System>
                <CellDivision write-log="celltype-csv" division-plane="random" name="proliferation">
                    <Triggers>
                        <!--    <Disabled>
            <Rule symbol-ref="celltype">
                <Expression>if(c_time &lt; 30, 7, 1)</Expression>
            </Rule>
        </Disabled>
    -->
                        <Rule symbol-ref="divisions">
                            <Expression>divisions + 1</Expression>
                        </Rule>
                        <Rule symbol-ref="celltype">
                            <Expression>7</Expression>
                        </Rule>
                    </Triggers>
                    <Condition>rand_uni(0,1)&lt;(p_proliferation*mcs_duration) &amp;&amp; K > 4.6863425</Condition>
                </CellDivision>
                <ChangeCellType name="Necrosis" newCellType="necrotic">
                    <Condition>C > 4 &amp;&amp; rand_uni(0,1) &lt; p_necrosis</Condition>
                    <Triggers>
                        <Rule symbol-ref="celltype">
                            <Expression>4</Expression>
                        </Rule>
                        <!--    <Disabled>
            <Rule symbol-ref="vc" name="cell volume">
                <Expression>12</Expression>
            </Rule>
        </Disabled>
    -->
                    </Triggers>
                </ChangeCellType>
                <Mapper name="Local APAP concentration">
                    <Input value="Pex"/>
                    <Output symbol-ref="Plocal" mapping="average"/>
                </Mapper>
                <Mapper name="Local TGFB concentration">
                    <Input value="T"/>
                    <Output symbol-ref="T_local" mapping="average"/>
                </Mapper>
                <Mapper name="Local MCP-1 concentration">
                    <Input value="M"/>
                    <Output symbol-ref="M_local" mapping="average"/>
                </Mapper>
                <Mapper name="Local mitogen concentration">
                    <Input value="MIT"/>
                    <Output symbol-ref="MIT_local" mapping="average"/>
                </Mapper>
                <Mapper name="# of hepatocytes">
                    <Input value="cell.id > 0"/>
                    <Output symbol-ref="hepatocytes_total" mapping="sum"/>
                </Mapper>
                <Mapper name="# cells in proliferation">
                    <Input value="celltype == 7"/>
                    <Output symbol-ref="proliferating" mapping="sum"/>
                </Mapper>
                <NeighborhoodReporter name="# of necrotic neighbours">
                    <Input scaling="cell" value="cell.type == celltype.necrotic.id"/>
                    <Output symbol-ref="neighb_nec" mapping="sum"/>
                </NeighborhoodReporter>
                <NeighborhoodReporter time-step="1.0" name="# of macrophage neighbours">
                    <Input scaling="cell" value="cell.type == celltype.macrophages.id"/>
                    <Output symbol-ref="neigh_hepmacro" mapping="sum"/>
                </NeighborhoodReporter>
                <CellDeath>
                    <Condition>senescence == 1 &amp;&amp; neigh_hepmacro > 0 &amp;&amp; nt_hepmacro > 60 &amp;&amp; rand_uni(0,1) &lt; (0.45*mcs_duration)</Condition>
                </CellDeath>
                <Event trigger="when-true" persistent="true" name="Senescence">
                    <Condition history="false">K &lt; 4.6863375 or senescence > 1</Condition>
                    <!--    <Disabled>
            <Rule symbol-ref="vc">
                <Expression>cellvolume*1.5</Expression>
            </Rule>
        </Disabled>
    -->
                    <Rule symbol-ref="celltype">
                        <Expression>6</Expression>
                    </Rule>
                    <Rule symbol-ref="T_senescence" name="TGF-beta production by senescent cells">
                        <Expression>0.01</Expression>
                    </Rule>
                    <Rule symbol-ref="senescence">
                        <Expression>senescence + 1</Expression>
                    </Rule>
                    <Rule symbol-ref="p_proliferation">
                        <Expression>0.0</Expression>
                    </Rule>
                </Event>
                <Constant symbol="k_stim" name="SMAD-dependent production of p21" value="0.000001"/>
                <Constant symbol="dk" name="Cyclin/CDK degradation" value="0.0050256 / 18"/>
                <Constant symbol="k_mitogen" name="mitogen-dependent Cyclin/CDK production" value="0.000010381944 * 5"/>
                <Constant symbol="k_inhibitor" name="Cyclin-D1 inhibition by p21" value="2"/>
                <!--    <Disabled>
            <Property symbol="p53_basal" name="Basal production rate of p53" value="p53_deg * p53"/>
        </Disabled>
    -->
                <!--    <Disabled>
            <Property symbol="p21_deg" name="p21 degradation rate" value="(p21_basal + k_p21 * p53) / p21"/>
        </Disabled>
    -->
                <Property symbol="bk" name="basal Cyclin/CDK synthesis rate" value="k_inhibitor * p21 * K + dk * K"/>
                <!--    <Disabled>
            <Property symbol="CD1_mito" name="Cyclin-D1" value="0"/>
        </Disabled>
    -->
                <!--    <Disabled>
            <Property symbol="CD1_bas" name="Cyclin-D1" value="0.3"/>
        </Disabled>
    -->
                <!--    <Disabled>
            <Function symbol="CD1">
                <Expression>CD1_bas + CD1_mito</Expression>
            </Function>
        </Disabled>
    -->
                <!--    <Disabled>
            <Equation symbol-ref="CD1">
                <Expression>CD1_bas + CD1_mito</Expression>
            </Equation>
        </Disabled>
    -->
                <!--    <Disabled>
            <Property symbol="CD1_basal" name="basal Cyclin-D1 synthesis rate" value="k_inhibitor * p21 * CD1_bas + CD1_deg * CD1_bas"/>
        </Disabled>
    -->
                <Property symbol="R" name="Free/unbound TGF-B receptor" value="1"/>
                <System time-step="0.05" name="Distance, GSH and P450 resetting" solver="Runge-Kutta [fixed, O(4)]">
                    <Rule symbol-ref="distance" name="Distance recalculation">
                        <Expression>sqrt(((cell.center.x-dimension)^2)+((cell.center.y-dimension)^2))</Expression>
                    </Rule>
                    <Rule symbol-ref="distance_normal">
                        <Expression>(distance/radius)</Expression>
                    </Rule>
                    <Rule symbol-ref="P450_cell">
                        <Expression>(d_p450+(1/(1+exp(b*(distance_normal-a)))))/c_p450</Expression>
                    </Rule>
                    <Rule symbol-ref="G_dist" name="GSH dependent on distance to CV">
                        <Expression>(d_gsh+(1/(1+exp(-b*(distance_normal-a)))))/c_gsh</Expression>
                    </Rule>
                    <!--    <Disabled>
            <Rule symbol-ref="GSH_deg">
                <Expression>GSH_basal / GSH_dist</Expression>
            </Rule>
        </Disabled>
    -->
                    <Rule symbol-ref="N_total" name="Total amount of NAPQI (5 to 10%)">
                        <Expression>N + C + NG</Expression>
                    </Rule>
                    <Rule symbol-ref="bGSH" name="basal GSH sythesis">
                        <Expression>dGSH*G_dist</Expression>
                    </Rule>
                </System>
                <Property symbol="G_dist" name="GSH distance at t=0" value="(d_gsh+(1/(1+exp(-b*(distance_normal-a)))))/c_gsh"/>
                <Constant symbol="c_gsh" name="denominator GSH" value="1.4556 * 10^-1 * 0.5"/>
                <Constant symbol="c_p450" name="denominator P450" value="3.33333"/>
                <Constant symbol="d_gsh" name="offset GSH scaling" value="1"/>
                <Constant symbol="d_p450" name="offset P450 scaling" value="3.33333"/>
                <Mapper name="Total volume hepatocytes">
                    <Input value="cell.volume"/>
                    <Output symbol-ref="volume_tot_hep" mapping="sum"/>
                </Mapper>
                <Mapper name="Total oxidation">
                    <Input value="N_total"/>
                    <Output symbol-ref="oxidation_total" mapping="sum"/>
                </Mapper>
                <Mapper name="Total glucuronidation and sulfation">
                    <Input value="sulf + gluc"/>
                    <Output symbol-ref="glucu_sulf_total" mapping="sum"/>
                </Mapper>
                <Property symbol="N_total" name="Total amount of NAPQI (5 to 10%)" value="N + C + NG"/>
                <Mapper name="Max intracellular APAP">
                    <Input value="Pin"/>
                    <Output symbol-ref="Pin_total" mapping="sum"/>
                </Mapper>
                <Mapper name="Max NAPQI">
                    <Input value="N"/>
                    <Output symbol-ref="N_max" mapping="maximum"/>
                </Mapper>
                <Mapper name="Max NAPQI_GSH">
                    <Input value="NG"/>
                    <Output symbol-ref="NG_max" mapping="maximum"/>
                </Mapper>
                <Mapper name="Min GSH">
                    <Input value="G_cell"/>
                    <Output symbol-ref="G_min" mapping="minimum"/>
                </Mapper>
                <Mapper name="Max NAPQI-protein">
                    <Input value="C"/>
                    <Output symbol-ref="C_max" mapping="maximum"/>
                </Mapper>
                <Mapper name="Max GSH">
                    <Input value="G_cell"/>
                    <Output symbol-ref="G_max" mapping="maximum"/>
                </Mapper>
                <!--    <Disabled>
            <Property symbol="GSH_basal" value="(0.5+(1/(1+exp(-b*(distance_normal-a)))))/0.5"/>
        </Disabled>
    -->
                <Mapper name="# of senescent cells">
                    <Input value="celltype == 6"/>
                    <Output symbol-ref="senescent_total" mapping="sum"/>
                </Mapper>
                <Property symbol="bGSH" name="basal GSH synthesis rate" value="dGSH*G_dist"/>
                <Constant symbol="dc" name="Self-set elimination rate of NAPQI-protein adducts" value="0.006944444"/>
                <Constant symbol="k_dp" value="0.614547/18"/>
                <Constant symbol="kd_p53" value="0.0711/18"/>
                <Constant symbol="kd_p53p" value="0.0003218/18"/>
                <Constant symbol="kd_p53_mdm2" value="3.69*10^-5 / 18"/>
                <Constant symbol="kd_p53p_mdm2" value="0.10386 / 18"/>
                <!--    <Disabled>
            <Constant symbol="ks_mdm2" name="Basal MDM2 synthesis" value="0.00039283"/>
        </Disabled>
    -->
                <Constant symbol="ks_mdm2_p53p" value="0.05012 / 18"/>
                <!--    <Disabled>
            <Constant symbol="ks_p21" value="0.01241"/>
        </Disabled>
    -->
                <Constant symbol="ks_p21_p53p" value="0.25631 / 18"/>
                <Constant symbol="Km_mdm2" value="0.2962"/>
                <Constant symbol="Km_p21" value="0.74052"/>
                <Constant symbol="k_p" value="0.0502 / 18"/>
                <!--    <Disabled>
            <Constant symbol="ks_p53" value="0.02394"/>
        </Disabled>
    -->
                <Constant symbol="kd_mdm2" value="0.123616 / 18"/>
                <Constant symbol="kd_p21" value="0.0050256 / 18"/>
                <Property symbol="ks_p53" value="kd_p53 * p53 + kd_p53_mdm2 * MDM2 * p53"/>
                <Property symbol="ks_mdm2" name="basal MDM2 sythesis" value="kd_mdm2 * MDM2"/>
                <Property symbol="ks_p21" name="Basal p21 synthesis" value="kd_p21 * p21"/>
                <Property symbol="kGSH" name="rate of NAPQI binding to GSH" value="1000*kP450*P450_cell/G_dist"/>
                <Property symbol="kpsh" name="rate of NAPQI-protein complex formation" value="kGSH * 0.01 * (d_gsh+(1/(1+exp(-b*(distance_normal-a)))))/c_gsh"/>
                <Property symbol="gluc" name="Glucuronidation" value="0.0"/>
                <Mapper name="Total sulfation">
                    <Input value="sulf"/>
                    <Output symbol-ref="sulf_total" mapping="sum"/>
                </Mapper>
                <Mapper name="Total glucuronidation">
                    <Input value="gluc"/>
                    <Output symbol-ref="gluc_total" mapping="sum"/>
                </Mapper>
            </CellType>
            <CellType class="biological" name="necrotic">
                <VolumeConstraint target="cellvolume" name="volume necrotic cell" strength="1"/>
                <Property symbol="rD" name="DAMP release rate" value="0.5"/>
                <Property symbol="celltype" name="cell type" value="4"/>
                <Property symbol="macro_neigh" name="macrophages in neighbourhood" value="0.0"/>
                <Property symbol="macro_neigh_time" name="Number of times in contact with macrophage" value="0.0"/>
                <CellDeath>
                    <Condition>macro_neigh > 0 &amp;&amp; macro_neigh_time > limit_neigh &amp;&amp; rand_uni(0,1) &lt; (0.9*mcs_duration)</Condition>
                </CellDeath>
                <NeighborhoodReporter time-step="1.0">
                    <Input scaling="cell" value="cell.type == celltype.macrophages.id"/>
                    <Output symbol-ref="macro_neigh" mapping="sum"/>
                </NeighborhoodReporter>
                <System time-step="1.0" solver="Heun [fixed, O(2)]">
                    <Rule symbol-ref="macro_neigh_time">
                        <Expression>if(macro_neigh > 0, macro_neigh_time+1, macro_neigh_time+0)</Expression>
                    </Rule>
                    <Rule symbol-ref="lifetime_necrotic">
                        <Expression>lifetime_necrotic + 1</Expression>
                    </Rule>
                </System>
                <Mapper name="# of necrotic cells">
                    <Input value="cell.id > 0"/>
                    <Output symbol-ref="necrotic_total" mapping="sum"/>
                </Mapper>
                <FreezeMotion>
                    <Condition>if(lifetime_necrotic > 1,1,0)</Condition>
                </FreezeMotion>
                <!--    <Disabled>
            <Property symbol="vc" name="cell volume" value="12"/>
        </Disabled>
    -->
                <Property symbol="lifetime_necrotic" name="Lifetime necrotic cell" value="0.0"/>
                <Constant symbol="limit_neigh" name="Limit of time in contact with macrophage before disappearance" value="150"/>
            </CellType>
            <CellType class="medium" name="medium"/>
            <CellType class="biological" name="macrophages">
                <Chemotaxis saturation="1" name="macrophage attraction to MCP-1" strength="chemotaxis" field="M"/>
                <VolumeConstraint target="mac_volume" name="volume deviation penalty of macrophage" strength="1"/>
                <Property symbol="celltype" name="cell type" value="5"/>
                <Property symbol="lifetime_macrophage" value="0.0"/>
                <Property symbol="T_macro" name="TGFB produced by macrophages" value="0"/>
                <Property symbol="chemotaxis" name="strength of chemotaxis" value="600"/>
                <Property symbol="CV_neigh" value="0.0"/>
                <Property symbol="mac_volume" name="macrophage target volume" value="cellvolume*0.5"/>
                <Property symbol="rmit" name="Mitogen release rate" value="4.0"/>
                <!--    <Disabled>
            <Event trigger="when-true" name="macrophage volume">
                <Condition>celltype.necrotic.size > 1</Condition>
                <Rule symbol-ref="mac_volume">
                    <Expression>cellvolume*0.6</Expression>
                </Rule>
            </Event>
        </Disabled>
    -->
                <!--    <Disabled>
            <Event trigger="when-true" name="release chemokines">
                <Condition>nec_neigh > 0</Condition>
                <Rule symbol-ref="TGFB_macro">
                    <Expression>0.1</Expression>
                </Rule>
                <Rule symbol-ref="mitorelease">
                    <Expression>10</Expression>
                </Rule>
                <Rule symbol-ref="chemotaxis">
                    <Expression>10</Expression>
                </Rule>
            </Event>
        </Disabled>
    -->
                <AddCell name="Macrophage entry" overwrite="true">
                    <Distribution>periportal_area</Distribution>
                    <Triggers/>
                    <Count>if(M_pp>0.0001 &amp;&amp; M_pp > alltime_M_pp_max*0.9 , (p_macrophage*mcs_duration),0)</Count>
                </AddCell>
                <NeighborhoodReporter name="number of necrotic neighbors">
                    <Input scaling="cell" value="cell.type == celltype.necrotic.id"/>
                    <Output symbol-ref="nec_neigh" mapping="sum"/>
                </NeighborhoodReporter>
                <NeighborhoodReporter name="average number of CV neighbors">
                    <Input scaling="cell" value="cell.type == celltype.CV.id"/>
                    <Output symbol-ref="CV_neigh" mapping="average"/>
                </NeighborhoodReporter>
                <CellDeath name="Macrophage disappearance">
                    <Condition>((lifetime_macrophage > 200 and M_mean &lt; 1 * 10^-5) &amp;&amp; rand_uni(0,1) &lt; (0.005*mcs_duration)) </Condition>
                </CellDeath>
                <System time-step="1.0" name="macrophage lifetime" solver="Heun [fixed, O(2)]">
                    <Rule symbol-ref="lifetime_macrophage">
                        <Expression>lifetime_macrophage + 1</Expression>
                    </Rule>
                    <Rule symbol-ref="nec_neigh_time">
                        <Expression>if(nec_neigh > 0, nec_neigh_time+1, nec_neigh_time+0)</Expression>
                    </Rule>
                </System>
                <Mapper name="# of macrophages">
                    <Input value="celltype == 5"/>
                    <Output symbol-ref="macrophages_total" mapping="sum"/>
                </Mapper>
                <!--    <Disabled>
            <Variable symbol="macrophages_total" value="0.0"/>
        </Disabled>
    -->
                <System name="release chemokines" solver="Dormand-Prince [adaptive, O(5)]">
                    <Rule symbol-ref="T_macro">
                        <Expression>if(nec_neigh > 0, T_macro_on, 0)</Expression>
                    </Rule>
                    <Rule symbol-ref="chemotaxis">
                        <Expression>if(pv_neigh > 0, 600, if(nec_neigh > 0, 2,100))</Expression>
                    </Rule>
                </System>
                <Property symbol="pv_neigh" value="0.0"/>
                <NeighborhoodReporter name="number of pv neighbor">
                    <Input scaling="length" value="cell.type == celltype.PV.id"/>
                    <Output symbol-ref="pv_neigh" mapping="average"/>
                </NeighborhoodReporter>
                <Constant symbol="p_macrophage" name="probability of macrophage appearance" value="0.5"/>
                <Property symbol="nec_neigh" name="Number of necrotic neighbors" value="0.0"/>
                <Property symbol="nec_neigh_time" name="Number of times in contact with necrotic cell" value="0.0"/>
                <Constant symbol="T_macro_on" name="TGF-beta expression if macrophages produce" value="0.2"/>
            </CellType>
            <CellType class="biological" name="kupffer">
                <VolumeConstraint target="cellvolume/10" name="Target volume" strength="1"/>
                <Property symbol="celltype" name="cell type" value="0"/>
                <Property symbol="NR_time" value="0.0"/>
                <Property symbol="rM" name="MCP-1 release rate" value="0.0"/>
                <Property symbol="NR_necrotic" name="number of necrotic cells" value="0.0"/>
                <Property symbol="P_kupf_local" name="Local APAP concentration in Kupffer cells" value="0.0"/>
                <System time-step="1.0" name="Time in contact with necrotic cells" solver="Heun [fixed, O(2)]">
                    <Rule symbol-ref="NR_time">
                        <Expression>if(NR_necrotic > 0, NR_time +5, 0)</Expression>
                    </Rule>
                </System>
                <Mapper name="Local APAP concentration">
                    <Input value="Pex"/>
                    <Output symbol-ref="P_kupf_local" mapping="average"/>
                </Mapper>
                <Mapper name="# of kupffer cells">
                    <Input value="cell.id > 0"/>
                    <Output symbol-ref="kupffer_total" mapping="sum"/>
                </Mapper>
                <NeighborhoodReporter name="Necrotic neighbours">
                    <Input scaling="cell" value="cell.type == celltype.necrotic.id"/>
                    <Output symbol-ref="NR_necrotic" mapping="sum"/>
                </NeighborhoodReporter>
                <Mapper name="Local DAMP concentration">
                    <Input value="D"/>
                    <Output symbol-ref="D_local" mapping="average"/>
                </Mapper>
                <Property symbol="D_local" name="Local DAMP concentration" value="0.0"/>
                <Mapper name="Total volume kupffer cells">
                    <Input value="cell.volume"/>
                    <Output symbol-ref="volume_tot_kupf" mapping="sum"/>
                </Mapper>
                <Constant symbol="rM_true" name="MCP1 release if conditions are met" value="75"/>
                <System name="MCP1 release" solver="Dormand-Prince [adaptive, O(5)]">
                    <Rule symbol-ref="rM">
                        <Expression>if(D_local > 0.5, rM_true, 0)</Expression>
                    </Rule>
                </System>
            </CellType>
        </CellTypes>
        <CPM>
            <Interaction default="0.0">
                <Contact type1="kupffer" type2="medium" value="0.8"/>
                <Contact type1="hepatocytes" type2="medium" value="0.8"/>
                <Contact type1="macrophages" type2="medium" value="0.8"/>
                <Contact type1="necrotic" type2="medium" value="0.8"/>
                <Contact type1="kupffer" type2="hepatocytes" value="2.2"/>
                <Contact type1="kupffer" type2="kupffer" value="2.2"/>
                <Contact type1="hepatocytes" type2="hepatocytes" value="2.2"/>
                <Contact type1="CV" type2="kupffer" value="2.2"/>
                <Contact type1="CV" type2="hepatocytes" value="2.2"/>
                <Contact type1="CV" type2="macrophages" value="2.2"/>
                <Contact type1="CV" type2="necrotic" value="2.2"/>
                <Contact type1="PV" type2="kupffer" value="2.2"/>
                <Contact type1="PV" type2="hepatocytes" value="2.2"/>
                <Contact type1="PV" type2="necrotic" value="2.2"/>
                <Contact type1="PV" type2="macrophages" value="2.2"/>
                <Contact type1="necrotic" type2="hepatocytes" value="2.2"/>
                <Contact type1="necrotic" type2="kupffer" value="2.2"/>
                <Contact type1="necrotic" type2="necrotic" value="2.2"/>
                <Contact type1="macrophages" type2="hepatocytes" value="2.2"/>
                <Contact type1="macrophages" type2="kupffer" value="2.2"/>
                <Contact type1="macrophages" type2="necrotic" value="2.2"/>
                <Contact type1="macrophages" type2="macrophages" value="2.2"/>
            </Interaction>
            <MonteCarloSampler stepper="edgelist">
                <MCSDuration symbol="mcs_duration" value="0.00675"/>
                <Neighborhood>
                    <Order>2</Order>
                </Neighborhood>
                <MetropolisKinetics temperature="0.4"/>
            </MonteCarloSampler>
            <ShapeSurface scaling="norm">
                <Neighborhood>
                    <Order>3</Order>
                    <!--    <Disabled>
            <Distance>2</Distance>
        </Disabled>
    -->
                </Neighborhood>
            </ShapeSurface>
        </CPM>
        <Analysis>
            <ModelGraph format="svg" reduced="false" include-tags="#untagged"/>
            <!--    <Disabled>
            <Gnuplotter time-step="24" decorate="true" name="APAP distribution" file-numbering="time">
                <Terminal name="png"/>
                <Plot title="Cell types">
                    <Cells opacity="0.6" flooding="true" max="7" min="0" value="celltype">
                        <ColorMap>
                            <Color value="0" color="medium-blue"/>
                            <Color value="1" color="brown4"/>
                            <Color value="2" color="red"/>
                            <Color value="3" color="red"/>
                            <Color value="4" color="black"/>
                            <Color value="5" color="green"/>
                            <Color value="6" color="gray"/>
                            <Color value="7" color="orange-red"/>
                        </ColorMap>
                    </Cells>
                </Plot>
                <Plot>
                    <Field symbol-ref="Pex" min="0"/>
                </Plot>
                <Plot>
                    <Cells value="Pin"/>
                </Plot>
                <Plot>
                    <Cells value="N"/>
                </Plot>
                <Plot>
                    <Cells value="C"/>
                </Plot>
                <Plot>
                    <Cells value="N_total"/>
                </Plot>
                <Disabled>
                    <Plot>
                        <Cells value="gluc"/>
                    </Plot>
                </Disabled>
                <Disabled>
                    <Plot>
                        <Cells value="G_cell"/>
                    </Plot>
                </Disabled>
                <Disabled>
                    <Plot>
                        <Cells value="P450_cell"/>
                    </Plot>
                </Disabled>
            </Gnuplotter>
        </Disabled>
    -->
            <!--    <Disabled>
            <Gnuplotter time-step="24" decorate="true" name="APAP detoxification" file-numbering="time">
                <Terminal name="png"/>
                <Plot title="Cell types">
                    <Cells opacity="0.6" flooding="true" max="7" min="0" value="celltype">
                        <ColorMap>
                            <Color value="0" color="medium-blue"/>
                            <Color value="1" color="brown4"/>
                            <Color value="2" color="red"/>
                            <Color value="3" color="red"/>
                            <Color value="4" color="black"/>
                            <Color value="5" color="green"/>
                            <Color value="6" color="gray"/>
                            <Color value="7" color="orange-red"/>
                        </ColorMap>
                    </Cells>
                </Plot>
                <Disabled>
                    <Plot>
                        <Field symbol-ref="Pex" min="0"/>
                    </Plot>
                </Disabled>
                <Disabled>
                    <Plot>
                        <Cells value="Pin"/>
                    </Plot>
                </Disabled>
                <Plot>
                    <Cells value="NG"/>
                </Plot>
                <Plot>
                    <Cells value="G_cell"/>
                </Plot>
                <Plot>
                    <Cells value="P450_cell"/>
                </Plot>
                <Plot>
                    <Cells value="gluc"/>
                </Plot>
                <Plot>
                    <Cells value="sulf"/>
                </Plot>
                <Disabled>
                    <Plot>
                        <Cells value="N_total"/>
                    </Plot>
                </Disabled>
            </Gnuplotter>
        </Disabled>
    -->
            <!--    <Disabled>
            <Gnuplotter time-step="6" name="Toxicity">
                <Plot>
                    <Cells min="0" value="P_ic"/>
                </Plot>
                <Terminal name="png"/>
                <Plot>
                    <Cells min="0" value="NAPQI"/>
                </Plot>
                <Plot>
                    <Cells max="0.07" min="0" value="GSH_cell"/>
                </Plot>
                <Plot>
                    <Cells value="NP_complex"/>
                </Plot>
            </Gnuplotter>
        </Disabled>
    -->
            <!--    <Disabled>
            <Gnuplotter time-step="24" name="Intracellular proteins">
                <Terminal name="png"/>
                <Disabled>
                    <Plot title="Cell types">
                        <Cells opacity="0.6" flooding="true" max="7" min="0" value="celltype">
                            <ColorMap>
                                <Color value="0" color="medium-blue"/>
                                <Color value="1" color="brown4"/>
                                <Color value="2" color="red"/>
                                <Color value="3" color="red"/>
                                <Color value="4" color="black"/>
                                <Color value="5" color="green"/>
                                <Color value="6" color="gray"/>
                                <Color value="7" color="orange-red"/>
                            </ColorMap>
                        </Cells>
                    </Plot>
                </Disabled>
                <Plot>
                    <Cells value="p53"/>
                </Plot>
                <Plot>
                    <Cells value="p53p"/>
                </Plot>
                <Plot>
                    <Cells max="4.6865" min="4.6863" value="p21"/>
                </Plot>
                <Disabled>
                    <Plot>
                        <Cells max="0.2635" min="0.26255" value="MDM2"/>
                    </Plot>
                </Disabled>
                <Plot>
                    <Cells max="4.6865" min="4.686275" value="K"/>
                </Plot>
            </Gnuplotter>
        </Disabled>
    -->
            <!--    <Disabled>
            <Gnuplotter time-step="24" name="Cytokines and chemokines">
                <Disabled>
                    <Plot title="Cell types">
                        <Cells opacity="0.6" flooding="true" max="7" min="0" value="celltype">
                            <ColorMap>
                                <Color value="0" color="medium-blue"/>
                                <Color value="1" color="brown4"/>
                                <Color value="2" color="red"/>
                                <Color value="3" color="red"/>
                                <Color value="4" color="black"/>
                                <Color value="5" color="green"/>
                                <Color value="6" color="gray"/>
                                <Color value="7" color="orange-red"/>
                            </ColorMap>
                        </Cells>
                    </Plot>
                </Disabled>
                <Plot>
                    <Field symbol-ref="M" min="0"/>
                </Plot>
                <Terminal name="png"/>
                <Plot>
                    <Field symbol-ref="MIT" min="0"/>
                </Plot>
                <Plot>
                    <Field symbol-ref="T" min="0"/>
                </Plot>
                <Plot>
                    <Field symbol-ref="D" min="0"/>
                </Plot>
            </Gnuplotter>
        </Disabled>
    -->
            <Gnuplotter time-step="24" name="Presentation output">
                <Terminal name="png"/>
                <Plot title="Cell types">
                    <Cells opacity="0.6" flooding="true" max="7" min="0" value="celltype">
                        <ColorMap>
                            <Color value="0" color="medium-blue"/>
                            <Color value="1" color="brown4"/>
                            <Color value="2" color="red"/>
                            <Color value="3" color="red"/>
                            <Color value="4" color="black"/>
                            <Color value="5" color="green"/>
                            <Color value="6" color="gray"/>
                            <Color value="7" color="orange-red"/>
                        </ColorMap>
                    </Cells>
                </Plot>
                <!--    <Disabled>
            <Plot>
                <Field symbol-ref="APAP" min="0"/>
            </Plot>
        </Disabled>
    -->
                <!--    <Disabled>
            <Plot>
                <Cells value="NT"/>
            </Plot>
        </Disabled>
    -->
                <!--    <Disabled>
            <Plot>
                <Cells value="NAPQI_total"/>
            </Plot>
        </Disabled>
    -->
            </Gnuplotter>
            <Logger time-step="3" name="Blood plasma concentration">
                <Input>
                    <Disabled>
                        <Symbol symbol-ref="cell.id"/>
                    </Disabled>
                    <Disabled>
                        <Symbol symbol-ref="cell.id"/>
                    </Disabled>
                    <Symbol symbol-ref="P_pv_local"/>
                </Input>
                <Output>
                    <TextOutput file-name="log_blood_apap"/>
                </Output>
                <Plots>
                    <Plot time-step="288">
                        <Style point-size="0.5" style="points"/>
                        <Terminal terminal="png"/>
                        <X-axis>
                            <Symbol symbol-ref="real_time"/>
                        </X-axis>
                        <Y-axis>
                            <Disabled>
                                <Symbol symbol-ref="cell.id"/>
                            </Disabled>
                            <Disabled>
                                <Symbol symbol-ref="cell.id"/>
                            </Disabled>
                            <Disabled>
                                <Symbol symbol-ref="cell.id"/>
                            </Disabled>
                            <Symbol symbol-ref="P_pv_local"/>
                        </Y-axis>
                    </Plot>
                </Plots>
            </Logger>
            <Logger time-step="12" name="Single cell concentrations">
                <Input>
                    <Symbol symbol-ref="real_time"/>
                    <Symbol symbol-ref="celltype"/>
                    <Symbol symbol-ref="N"/>
                    <Symbol symbol-ref="p53"/>
                    <Symbol symbol-ref="p21"/>
                    <Symbol symbol-ref="distance"/>
                    <Symbol symbol-ref="Pin"/>
                    <Symbol symbol-ref="P450_cell"/>
                    <Symbol symbol-ref="G_cell"/>
                    <Symbol symbol-ref="C"/>
                    <Symbol symbol-ref="K"/>
                    <Symbol symbol-ref="MDM2"/>
                    <Symbol symbol-ref="NG"/>
                    <Symbol symbol-ref="sulf"/>
                    <Symbol symbol-ref="gluc"/>
                    <Symbol symbol-ref="p53p"/>
                </Input>
                <Output>
                    <TextOutput file-name="log_SingleCellConc" separator="tab" file-format="csv"/>
                </Output>
            </Logger>
            <Logger time-step="12.0" name="Volume">
                <Input>
                    <Symbol symbol-ref="celltype"/>
                    <Symbol symbol-ref="cell.id"/>
                    <Symbol symbol-ref="cell.volume"/>
                    <Symbol symbol-ref="volume_tot_hep"/>
                    <Symbol symbol-ref="volume_tot_kupf"/>
                </Input>
                <Output>
                    <TextOutput file-name="log_volume"/>
                </Output>
            </Logger>
            <!--    <Disabled>
            <Logger time-step="3" name="Mean NAPQI-protein">
                <Input>
                    <Disabled>
                        <Symbol symbol-ref="cell.id"/>
                    </Disabled>
                    <Disabled>
                        <Symbol symbol-ref="cell.id"/>
                    </Disabled>
                    <Symbol symbol-ref="NP_mean"/>
                </Input>
                <Output>
                    <TextOutput file-name="log_npmean"/>
                </Output>
                <Plots>
                    <Plot time-step="2">
                        <Style point-size="0.5" style="points"/>
                        <Terminal terminal="png"/>
                        <X-axis>
                            <Symbol symbol-ref="real_time"/>
                        </X-axis>
                        <Y-axis>
                            <Disabled>
                                <Symbol symbol-ref="cell.id"/>
                            </Disabled>
                            <Disabled>
                                <Symbol symbol-ref="cell.id"/>
                            </Disabled>
                            <Disabled>
                                <Symbol symbol-ref="cell.id"/>
                            </Disabled>
                            <Symbol symbol-ref="NP_mean"/>
                        </Y-axis>
                    </Plot>
                </Plots>
            </Logger>
        </Disabled>
    -->
            <Logger time-step="3" name="APAP conversion">
                <Input>
                    <Symbol symbol-ref="oxidation_total"/>
                    <Symbol symbol-ref="glucu_sulf_total"/>
                    <Symbol symbol-ref="Pin_total"/>
                    <Symbol symbol-ref="Perc_gluc_sulf"/>
                    <Symbol symbol-ref="Perc_oxidation"/>
                    <Symbol symbol-ref="real_time"/>
                    <Symbol symbol-ref="gluc_total"/>
                    <Symbol symbol-ref="sulf_total"/>
                </Input>
                <Output>
                    <TextOutput file-name="log_oxi_gluc"/>
                </Output>
                <Plots>
                    <Plot time-step="288">
                        <Style style="points"/>
                        <Terminal terminal="png"/>
                        <X-axis>
                            <Symbol symbol-ref="real_time"/>
                        </X-axis>
                        <Y-axis>
                            <Symbol symbol-ref="oxidation_total"/>
                            <Symbol symbol-ref="glucu_sulf_total"/>
                            <Symbol symbol-ref="Pin_total"/>
                        </Y-axis>
                    </Plot>
                </Plots>
            </Logger>
            <Logger time-step="3" name="Metabolite concentrations">
                <Input>
                    <Symbol symbol-ref="N_max"/>
                    <Symbol symbol-ref="NG_max"/>
                    <Symbol symbol-ref="C_max"/>
                    <Symbol symbol-ref="G_max"/>
                    <Symbol symbol-ref="G_min"/>
                    <Symbol symbol-ref="real_time"/>
                </Input>
                <Output>
                    <TextOutput file-name="log_MetaboliteConc"/>
                </Output>
                <Plots>
                    <Plot time-step="288">
                        <Style style="points"/>
                        <Terminal terminal="png"/>
                        <X-axis>
                            <Symbol symbol-ref="real_time"/>
                        </X-axis>
                        <Y-axis>
                            <Symbol symbol-ref="G_min"/>
                            <Symbol symbol-ref="G_max"/>
                            <Symbol symbol-ref="N_max"/>
                            <Symbol symbol-ref="NG_max"/>
                            <Symbol symbol-ref="C_max"/>
                        </Y-axis>
                    </Plot>
                </Plots>
            </Logger>
            <Logger time-step="3" name="Cell counts">
                <Input>
                    <Symbol symbol-ref="hepatocytes_total"/>
                    <Symbol symbol-ref="necrotic_total"/>
                    <Symbol symbol-ref="senescent_total"/>
                    <Symbol symbol-ref="macrophages_total"/>
                    <Symbol symbol-ref="hepatocytes_healthy"/>
                    <Symbol symbol-ref="kupffer_total"/>
                </Input>
                <Output>
                    <TextOutput file-name="log_cellcounts"/>
                </Output>
                <Plots>
                    <Plot time-step="288">
                        <Style style="points"/>
                        <Terminal terminal="png"/>
                        <X-axis>
                            <Symbol symbol-ref="real_time"/>
                        </X-axis>
                        <Y-axis>
                            <Symbol symbol-ref="hepatocytes_healthy"/>
                            <Symbol symbol-ref="necrotic_total"/>
                            <Symbol symbol-ref="macrophages_total"/>
                            <Symbol symbol-ref="hepatocytes_total"/>
                            <Symbol symbol-ref="senescent_total"/>
                        </Y-axis>
                    </Plot>
                </Plots>
            </Logger>
            <!--    <Disabled>
            <Logger time-step="1000" name="Field values">
                <Input>
                    <Symbol symbol-ref="portal_area"/>
                    <Disabled>
                        <Symbol symbol-ref="cell.id"/>
                    </Disabled>
                    <Symbol symbol-ref="periportal_area"/>
                </Input>
                <Output>
                    <TextOutput file-name="Field values"/>
                </Output>
            </Logger>
        </Disabled>
    -->
            <Logger time-step="3" name="APAP elimination">
                <Input>
                    <Symbol symbol-ref="real_time"/>
                    <Symbol symbol-ref="efflux_perc"/>
                    <Symbol symbol-ref="uptake_perc"/>
                </Input>
                <Output>
                    <TextOutput file-name="log_Elimination"/>
                </Output>
            </Logger>
            <Logger time-step="3" name="Mean MCP-1 in PP">
                <Input>
                    <Disabled>
                        <Symbol symbol-ref="cell.id"/>
                    </Disabled>
                    <Disabled>
                        <Symbol symbol-ref="cell.id"/>
                    </Disabled>
                    <Symbol symbol-ref="M_pp"/>
                </Input>
                <Output>
                    <TextOutput file-name="log_mcp1"/>
                </Output>
                <Plots>
                    <Plot time-step="288">
                        <Style point-size="0.5" style="points"/>
                        <Terminal terminal="png"/>
                        <X-axis>
                            <Symbol symbol-ref="real_time"/>
                        </X-axis>
                        <Y-axis>
                            <Disabled>
                                <Symbol symbol-ref="cell.id"/>
                            </Disabled>
                            <Disabled>
                                <Symbol symbol-ref="cell.id"/>
                            </Disabled>
                            <Disabled>
                                <Symbol symbol-ref="cell.id"/>
                            </Disabled>
                            <Symbol symbol-ref="M_pp"/>
                        </Y-axis>
                    </Plot>
                </Plots>
            </Logger>
            <Logger time-step="3" name="Extracellular concentrations">
                <Input>
                    <Symbol symbol-ref="real_time"/>
                    <Symbol symbol-ref="Pex_mean"/>
                    <Symbol symbol-ref="MIT_mean"/>
                    <Symbol symbol-ref="M_mean"/>
                    <Symbol symbol-ref="D_mean"/>
                    <Symbol symbol-ref="T_mean"/>
                </Input>
                <Output>
                    <TextOutput file-name="log_ExtracellularConc" separator="tab" file-format="csv"/>
                </Output>
            </Logger>
            <!--    <Disabled>
            <Logger time-step="1.0">
                <Input>
                    <Symbol symbol-ref="MCP1_loc_kup"/>
                    <Symbol symbol-ref="cell.volume"/>
                </Input>
                <Output>
                    <TextOutput file-name="mcp1_loc_kup"/>
                </Output>
            </Logger>
        </Disabled>
    -->
            <!--    <Disabled>
            <Logger time-step="1.0" name="parameter_values">
                <Input>
                    <Symbol symbol-ref="kpsh"/>
                    <Symbol symbol-ref="bGSH"/>
                    <Symbol symbol-ref="kGSH"/>
                    <Symbol symbol-ref="Pin"/>
                    <Symbol symbol-ref="G_dist"/>
                </Input>
                <Output>
                    <TextOutput file-name="kpsh"/>
                </Output>
            </Logger>
        </Disabled>
    -->
            <!--    <Disabled>
            <Gnuplotter time-step="1.0">
                <Plot>
                    <Field symbol-ref="portal_area"/>
                </Plot>
                <Terminal name="png"/>
                <Plot>
                    <Field symbol-ref="periportal_area"/>
                </Plot>
            </Gnuplotter>
        </Disabled>
    -->
            <Function symbol="hepatocytes_healthy" name="Hepatocytes (non-senescent)">
                <Expression>hepatocytes_total - senescent_total</Expression>
            </Function>
        </Analysis>
        <CellPopulations>
            <Population type="macrophages" name="Macrophages" size="0"/>
            <Population type="necrotic" name="Necrotic cells" size="0"/>
            <Population type="hepatocytes" name="Hepatocytes" size="600">
                <InitCircle name="Hepatocyte initialisation" number-of-cells="600" mode="random">
                    <Dimensions radius="radius" center="size.x/2, size.y/2, 0"/>
                </InitCircle>
            </Population>
            <Population type="kupffer" name="Kupffer cells" size="150">
                <InitCircle name="Kupffer cell initialisation" number-of-cells="150" mode="random">
                    <Dimensions radius="radius" center="size.x/2, size.y/2, 0"/>
                </InitCircle>
            </Population>
            <Population type="CV" name="Central vein" size="1">
                <InitCellObjects name="Set coordinates" mode="order">
                    <Arrangement displacements="1, 1, 1" repetitions="1, 1, 1">
                        <Sphere radius="14" center="100, 100.0, 0.0"/>
                    </Arrangement>
                </InitCellObjects>
            </Population>
            <Population type="PV" name="Portal vein" size="1">
                <InitCellObjects name="bottom left" mode="order">
                    <Arrangement displacements="1, 1, 1" repetitions="1, 1, 1">
                        <Sphere radius="5" center="50,5, 0.0"/>
                    </Arrangement>
                </InitCellObjects>
                <InitCellObjects name="bottom right" mode="order">
                    <Arrangement displacements="1, 1, 1" repetitions="1, 1, 1">
                        <Sphere radius="5" center="150, 5.0, 0.0"/>
                    </Arrangement>
                </InitCellObjects>
                <InitCellObjects name="mid left" mode="order">
                    <Arrangement displacements="1, 1, 1" repetitions="1, 1, 1">
                        <Sphere radius="5" center="5.0, 100.0, 0.0"/>
                    </Arrangement>
                </InitCellObjects>
                <InitCellObjects name="mid right" mode="order">
                    <Arrangement displacements="1, 1, 1" repetitions="1, 1, 1">
                        <Sphere radius="5" center="195.0, 100.0, 0.0"/>
                    </Arrangement>
                </InitCellObjects>
                <InitCellObjects name="upper left" mode="order">
                    <Arrangement displacements="1, 1, 1" repetitions="1, 1, 1">
                        <Sphere radius="5" center="50, 195.0, 0.0"/>
                    </Arrangement>
                </InitCellObjects>
                <InitCellObjects name="upper right" mode="order">
                    <Arrangement displacements="1, 1, 1" repetitions="1, 1, 1">
                        <Sphere radius="5" center="150.0, 195.0, 0.0"/>
                    </Arrangement>
                </InitCellObjects>
            </Population>
        </CellPopulations>
    </MorpheusModel>
    
    

    This model also requires the separate file hexagon_200.tif.
    Model Graph
    Model Graph

    Downloads

    Files associated with this model:

    Next