sim_branching

calculate_discretization(positions: ndarray, n_voxels: int, options: Options, raw: bool = False)
calculate_fractal_dim_for_pos(pos, options: Options, out_path: Path | None = None)
check_exists(options: Options) Path | None
load_or_compute_full(options)

Obtains a result for a given combination of options by either loading from existing files or performing a fully new numerical simulation.

See also

The load_or_compute_last_iter() function is cheaper when only loading the last iteration.

load_or_compute_last_iter(options)
plot_discretizations(last_pos, n_voxels_list, options, out_path: Path)
class BacteriaBranching

Bases: object

division_radius
growth_rate
interaction
mechanics
uptake_rate
class BacterialParameters(**kwargs)

Bases: object

cell_radius
damping_constant
division_threshold
growth_rate
n_bacteria_initial
potential_stiffness
potential_strength
uptake_rate
class DomainParameters(**kwargs)

Bases: object

diffusion_constant
domain_size

Overall size of the domain

domain_starting_size

Size of the square for initlal placement of bacteria

initial_concentration
reactions_dx

Discretization of the diffusion process

voxel_size
class Options(**kwargs)

Bases: object

static load_from_toml(path)
save_to_toml(path)
bacteria

Holds bacteria parameters. See BacterialParameters.

domain

Holds domain parameters. See DomainParameters.

n_threads

Specify how many threads to use for the simulation. Must be a positive integer value.

show_progressbar

Show or hide the progress bar during the simulation.

storage_location

If this variable is set to None, no output will be produced and results will only be returned in memory. If a path is given, results will be stored there with a timestamp of the beginning of the simulation.

time

Holds time parameters. See TimeParameters.

class SubDomainPlainIndex

Bases: object

Identifier or subdomains

class TimeParameters(**kwargs)

Bases: object

dt
save_interval
t_max
get_all_iterations(path)

Obtains all iterations for a given result.

The same comment from load_cells() applies.

load_cells(path)

Loads all cells for all iterations from a given path.

Caution

Notice that this input expects a path containing the simulation results directly. This means for practical purposes that a date signature such as will have to be added (i.e. path=out/2025-04-26-T18-06-43).

load_cells_at_iteration(path, iteration)

Loads all cells from a given path for a specific iteration.

The same comment from load_cells() applies.

load_subdomains_at_iteration(path, iteration)
run_sim_branching(options)

Performs a full numerical simulation with the given Options.

Warning

Although this function is fully working it is highly recommended to use the load_or_compute_full() function instead which will check first if a result with the given options has already been produced and thus reuse these existing results.

class MorsePotential

See the documentation at cellular_raza-building_blocks::MorsePotential.

class NewtonDamped2D

See the documentation at cellular_raza-building_blocks::NewtonDamped2D.