Simulation

Recurring Arguments

Name

Type

Description

output_path

Path

Path of the stored results.

iteration

int

Iteration count at which to obtain results.

element_path

str

Identifier which should be “cell_storage” or “voxel_storage”

threads

int

Number of threads to use simultaneously.

iteration

int

Iteration count at which to obtain results.

calculate_entropy(output_path, iteration) ndarray

Obtain entropies for both species.

Parameters:
  • output_path (Path) – Path of the stored results.

  • iteration (int) – Iteration count at which to obtain results.

Returns:

Array containing entropy values for both species.

Return type:

np.ndarray

calculate_spatial_density(data, domain, weights=None)

Calculates the spatial entry given data for cells and domain.

Parameters:
  • data (pd.DataFrame) – DataFrame containing cellular properties.

  • domain (pd.DataFrame) – DataFrame containing domain properties.

  • weights (list) – List of weightings to use for calculating the entropy. Will be filled

  • provided. (automatically by the volume of the individual cells if not)

generate_cells(n_cells_1, n_cells_2, domain, randomness=0.0, pad=0.15, seed=0, homogenous=False, template=Bacteria {     mechanics: NewtonDamped2D {         pos: [             [                 0.0,                 0.0,             ],         ],         vel: [             [                 0.0,                 0.0,             ],         ],         damping_constant: 0.5,         mass: 7.704755982928968,     },     cycle: BacteriaCycle {         volume_division_threshold: 14.137166941154069,         lag_phase_transition_rate_1: 0.005,         lag_phase_transition_rate_2: 0.008,     },     cellular_reactions: BacteriaReactions {         potential_strength: 0.5,         food_to_volume_conversion: 0.1,         lag_phase_active: true,         species: S1,         cell_volume: 7.0685834705770345,         uptake_rate: 0.01,         inhibition_production_rate: 0.1,         inhibition_coefficient: 0.1,     },     interactionextracellulargradient: GradientSensing, })

n_cells_1: int n_cells_2: int uniformity: float

Floating point number between 0.0 and 1.0

get_all_iterations(output_path, element_path='cell_storage')

Obtain a sorted list of all saved iteration counts.

Parameters:
  • output_path (Path) – Path of the stored results.

  • element_path (str) – Identifier which should be “cell_storage” or “voxel_storage”

Returns:

Sorted list of iteration counts.

Return type:

list[int]

get_elements_at_all_iterations(output_path: Path, element_path='cell_storage', threads=1)
Parameters:
  • output_path (Path) – Path of the stored results.

  • element_path (str) – Identifier which should be “cell_storage” or “voxel_storage”

  • threads (int) – Number of threads to use simultaneously.

Returns:

get_elements_at_iter(output_path: Path, iteration, element_path='cell_storage') DataFrame

Helper function to obtain information about cells or the domain at a given iteration point.

Parameters:
  • output_path (Path) – Path of the stored results.

  • iteration (int) – Iteration count at which to obtain results.

  • element_path (str) – Identifier which should be “cell_storage” or “voxel_storage”

Returns:

DataFrame containing all information

Return type:

pd.DataFrame

get_last_output_path(name='pool_model', prefix='out') Path

Returns the path of the last numerical result.

Parameters:

name (str) – Name of the subfolder in which to look for.

Returns:

Storage Path of the last simulation result

Return type:

Path

get_simulation_settings(output_path) tuple[Any, Any, Any]

Obtain simulation settings for a given output path.

Parameters:

output_path (Path) – Path of the stored results.

Returns:

A tuple containing json results of the domain, initial cells and meta parameters.

Return type:

(Any, Any, Any)