Cell

The Cell class is used to work with individual agents, i.e. cells.

To import this class use:

import ru.biosoft.physicell.core.Cell

In this class, there are 4 separate classes, each of which is used to work with a specific characteristic of the cell.

Cell classes

Class

Description

CellFunctions functions

Used to describe the basic functions of a cell.

All members of this class are presented in Table 1.1.

CellParameters parameters

Used to describe additional built-in cell parameters.

All members of this class are presented in Table 1.2.

CellState state

Used to describe the current state of the cell.

All members of this class are presented in Table 1.3.

CustomCellData customData

Used to describe user variables and cell parameters.

All members of this class are presented in Table 1.4.

The remaining members of the Cell class are presented in Table 1.5.

Table 1.1. Members of the CellFunctions class

Class member

Description

Instantiator instantiator

Contains an Instantiator class object that describes what happens when a new cell is created.

VolumeUpdate updateVolume

Contains an object of the VolumeUpdate class, which describes how the volume of a cell changes during its life.

StandardVolumeUpdate is almost always used.

UpdateMigrationBias updateMigration

Contains an object of the UpdateMigrationBias class, which describes the targeted movement of a cell (for example, based on chemotaxis).

Examples: Chemotaxis, Advanced Chemotaxis.

Example of usage.

CustomCellRule customCellRule

Contains an object of the CustomCellRule class, which describes an additional rule for the life of a cell (for example, avoid grid boundaries).

Example of usage.

UpdatePhenotype updatePhenotype

Contains an object of the UpdatePhenotype class, which describes how the main internal parameters of the cell change.

For example, “Default O2-based Phenotype” - based on the oxygen concentration in the environment.

Example of usage.

pre_update_intracellular pre_update_intracellular

Contains an object of the pre_update_intracellular class.

Called before the calculation step of the intracellular ODE/FBA model.

post_update_intracellular post_update_intracellular

Contains an object of the post_update_intracellular class.

Called after the intracellular ODE/FBA model calculation step.

UpdateVelocity updateVelocity

Contains an object of the UpdateVelocity class that describes the movement of the cell as a whole, taking into account purposeful and random movement, as well as attraction and repulsion by other cells.

StandardUpdateVelocity is almost always used.

MembraneInteractions membraneInteraction

Contains an object of the MembraneInteractions class that describes the interaction of a cell with the basement membrane.

Example, DomainEdgeAvoidance - establishes the avoidance of the basement membrane by cells.

DistanceCalculator membraneDistanceCalculator

Contains an object of the DistanceCalculator class, which describes the calculation of the distance from the cell to the basement membrane.

For example, DomainEdgeDistance - calculates the distance to the basement membrane as the distance to the nearest lattice boundary.

set_orientation set_orientation

Contains an object of the set_orientation class that describes how the cell’s orientation in space is set after division.

For example, UpOrientation - sets the orientation along the Z axis.

Contact contact

Contains an object of the Contact class that describes the interaction between linked cells.

For example, StandardElasticContact is an elastic interaction.

CellDivision cellDivision

Contains an object of the CellDivision class that describes how cell division occurs.

For example, StandardAsymmetricDivision - asymmetric division.

Standard division is used if cellDivision is not set (-).
Table 1.2. Members of the CellParameters class

Class member

Description

double o2_proliferation_saturation

Contains the amount of oxygen at which it ceases to enhance cell proliferation.

Used for cells with the phenotype “Default O2-based phenotype”.

Example of usage.

double o2_reference

Contains oxygen reference value.

Example of usage.
Table 1.3. Members of the CellState class

Class member

Description

List<Cell> attachedCells

Contains a list of cells connected to a given cell.

Example of usage.

double damage

Contains the current amount of damage done to the cell.

Example of usage.

double simplePressure

Contains the value of the pressure exerted on the cell from the outside.

Example of usage.

List<Cell> neighbors

Contains an array of cells that are neighbors of a given cell.

Example of usage.
int attachedCells.size()

or

int numberAttachedCells()
Return the number of cells connected to a given cell.

Example of usage.
Table 1.4. Members of the CustomCellData class

Class member

Description

int findVariableIndex(String variable)

variable - name of the variable.

Returns the index of variable in the list of all variables of the cell type.

Example of usage.

double get(int index)

index - index of the variable.

Returns the value of the variable at index for the given cell.

Example of usage.

void set(String name, double value)

name - name of the parameter.
value - value.

Sets the value of the user parameter name.

Example of usage.
Table 1.5. Other members of the Cell class

Class member

Description

Cell cell = new Cell(CellDefinition cd, Model model)

cd - cell type.
model - model.

The constructor creates a new cell of type cd in the model model.

Example of usage.

double[] position

Contains a three-dimensional vector - cell coordinates.

Example of usage.

double[] velocity

Contains a three-dimensional vector - the speed of the cell.

Example of usage.

int type

Contains a numeric code for the type of this cell.

Example of usage.

int ID

Contains the automatically generated cell identifier.

Example of usage.

String typeName

Contains the name of the cell type to which the cell belongs.

Example of usage.

static void detachCells(Cell cell1, Cell cell2)

cell1 - cell.
cell2 - cell.

Uncouples cells cell1 and cell2.

Example of usage.

static void attachcCells(Cell cell1, Cell cell2)

cell1 - cell.
cell2 - cell.

Links cells cell1 and cell2.

Example of usage.

static void createCell(CellDefinition cd, Model model, double[] position)

cd - cell type.
model - model.
position - cell coordinates.

Creates a cell of type cd in the model at position.

Example of usage.

Microenvironment getMicroenvironment()

Returns the environment in which the cell exists.

Example of usage.

double nearest_gradient(int index)

index - substrate index.

Returns the value of the substrate density gradient with index index in the grid cell closest to the cell.

Example of usage.

void startDeath(int index)

index - index of the type of cell death.

Triggers cell death with index index.

Example of usage.

List<Cell> cells_in_my_container()

Returns a list of cells in the space cell of a given cell.

Example of usage.

void removeAllAttachedCells()

Detachs all cells attached to a given cell.

Example of usage.

Model getModel()

Returns the model in which this cell is located.

Example of usage.

double[] nearest_density_vector()

Returns an array of densities of all substrates in the grid cell where this cell is located.

Example of usage.

void ingestCell(Cell cell)

cell - cell.

The cell to which this method was applied engulfs the cell cell.

Example of usage.

double nearestGradient(String substrate)

substrate - name of the substrate.

Returns the gradient of the substrate in the grid cell in which this cell is located.

Example of usage.

void lyseCell()

Activates lysis of a given cell.

Example of usage.

int get_current_mechanics_voxel_index()

Returns the number of the grid cell in which the given cell is located.

Example of usage.

CellContainer get_container()

Returns an object that handles the position of this cell in the grid.

Example of usage.

static boolean isNeighborVoxel(Cell cell, double[] coordinates, double[] center, int index)

cell - cell.
coordinates - cell coordinates.
center - the center of the environment cell.
index - environment cell index.

Returns true if the environment cell with index index centered at center is adjacent* to cell cell located at coordinates.

*By adjacent we mean that a cell can interact with cells in those grid cells.

Example of usage.

List<Cell> nearby_interacting_cells()

Returns an array of cells that are neighbors and are close enough to interact with this cell.

Example of usage.