physicool.updaters

A module to create model updater functions for the PhysiCOOL black-box.

Module Contents

Classes

ParamsUpdater

Helper class that provides a standard way to create an ABC using

CellUpdater

Helper class that provides a standard way to create an ABC using

MicroenvironmentUpdater

Helper class that provides a standard way to create an ABC using

Functions

update_cycle_values(cell_data, new_values)

Updates the numerical values for the Cycle class.

update_volume_values(cell_data, new_values)

Updates the numerical values for the Volume class.

update_motility_values(cell_data, new_values)

Updates the numerical values for the Motility class.

update_mechanics_values(cell_data, new_values)

Updates the numerical values for the Mechanics class.

update_substance_values(substance, new_values)

Updates the numerical values for a Substance class (microenvironment).

Attributes

CellUpdaterFunction

physicool.updaters.CellUpdaterFunction
physicool.updaters.update_cycle_values(cell_data, new_values)[source]

Updates the numerical values for the Cycle class.

Parameters:
  • cell_data (physicool.datatypes.CellParameters) – The cell data structure to be modified.

  • new_values (Dict[str, float]) – The new values to be written to the volume section of the CellParameters class. Keys should follow the pattern “phase_{i}” where i represents the id of the phase to be updated. All transition rates/durations must be specified.

physicool.updaters.update_volume_values(cell_data, new_values)[source]

Updates the numerical values for the Volume class.

Parameters:
  • cell_data (physicool.datatypes.CellParameters) – The cell data structure to be modified.

  • new_values (Dict[str, float]) – The new values to be written to the volume section of the CellParameters class. Keys should be the same as those in the XML file, but it is not required to include all the keys.

physicool.updaters.update_motility_values(cell_data, new_values)[source]

Updates the numerical values for the Motility class.

Parameters:
  • cell_data (physicool.datatypes.CellParameters) – The cell data structure to be modified.

  • new_values (Dict[str, float]) – The new values to be written to the motility section of the CellParameters class. Keys should be the same as those in the XML file, but it is not required to include all the keys.

physicool.updaters.update_mechanics_values(cell_data, new_values)[source]

Updates the numerical values for the Mechanics class.

Parameters:
  • cell_data (physicool.datatypes.CellParameters) – The cell data structure to be modified.

  • new_values (Dict[str, float]) – The new values to be written to the mechanics section of the CellParameters class. Keys should be the same as those in the XML file, but it is not required to include all the keys.

class physicool.updaters.ParamsUpdater[source]

Bases: abc.ABC

Helper class that provides a standard way to create an ABC using inheritance.

config_path: Union[str, pathlib.Path]
parser: physicool.config.ConfigFileParser
__post_init__()[source]

Creates the ConfigFileParser instance to be accessed by the class.

classmethod update(new_values)[source]

Updates the XML file with the values passed as input.

Parameters:

new_values (Dict[str, float]) –

Return type:

None

class physicool.updaters.CellUpdater[source]

Bases: ParamsUpdater

Helper class that provides a standard way to create an ABC using inheritance.

updater_function: CellUpdaterFunction
cell_definition_name: str = 'default'
update(new_values)[source]

Updates the XML file with the values passed as input.

Parameters:

new_values (Dict[str, float]) –

Return type:

None

physicool.updaters.update_substance_values(substance, new_values)[source]

Updates the numerical values for a Substance class (microenvironment).

Parameters:
  • substance (physicool.datatypes.Substance) – The substance data to be updated.

  • new_values (Dict[str, float]) – The new values to be written to the substance class. Keys should be the same as those in the XML file, but it is not required to include all the keys.

class physicool.updaters.MicroenvironmentUpdater[source]

Bases: ParamsUpdater

Helper class that provides a standard way to create an ABC using inheritance.

substance_name: str
update(new_values)[source]

Updates the XML file with the values passed as input.

Parameters:

new_values (Dict[str, float]) –

Return type:

None