This toy model represents protocells as containers with internal molecular abundance. Protocells grow, divide above a threshold, and may lose material.

This toy model represents protocells as containers with internal molecular abundance. Protocells grow, divide above a threshold, and may lose material.

protocell_simulation(
  n_cells = 20,
  steps = 100,
  growth_rate = 0.2,
  division_threshold = 10,
  leakage_rate = 0.03,
  seed = NULL
)

protocell_simulation(
  n_cells = 20,
  steps = 100,
  growth_rate = 0.2,
  division_threshold = 10,
  leakage_rate = 0.03,
  seed = NULL
)

Arguments

n_cells

Initial number of protocells.

steps

Number of simulation steps.

growth_rate

Mean growth rate per step.

division_threshold

Abundance threshold for division.

leakage_rate

Fraction of abundance lost per step.

seed

Optional random seed.

Value

A tibble with population-level summaries.

A tibble with population-level summaries.

Examples

cells <- protocell_simulation(n_cells = 10, steps = 30, seed = 3)
head(cells)
#> # A tibble: 6 × 4
#>    step n_cells mean_abundance max_abundance
#>   <int>   <int>          <dbl>         <dbl>
#> 1     0      10           1.90          2.62
#> 2     1      10           2.04          2.74
#> 3     2      10           2.15          2.79
#> 4     3      10           2.32          3.01
#> 5     4      10           2.49          3.25
#> 6     5      10           2.58          3.33
cells <- protocell_simulation(n_cells = 10, steps = 30, seed = 3)
head(cells)
#> # A tibble: 6 × 4
#>    step n_cells mean_abundance max_abundance
#>   <int>   <int>          <dbl>         <dbl>
#> 1     0      10           1.90          2.62
#> 2     1      10           2.04          2.74
#> 3     2      10           2.15          2.79
#> 4     3      10           2.32          3.01
#> 5     4      10           2.49          3.25
#> 6     5      10           2.58          3.33