Custom code for model

Note

This section is intended for advanced users and is optional - you can create models without using code.

Cell behavior, as well as other aspects of the model, can be specified by java code describing a suitable java class.

In particular, using java code you can configure:

  • Various cell functions (changes in internal state, motility, cell contact, etc.).

  • Cell rendering colors under different conditions.

  • Initial location of cells.

  • Output of reports and logs during model simulation.

  • Model events.

  • Rules for creating new cells.

etc.

Java code is stored as separate files in the BioUML repository. Each file describes one java class.

To create a java file (java class) you need:

  1. Right-click on the folder in the repository in which you want to create a java class.

  2. In the drop-down list, click LMB on icon_new_Java_code New Java code.

  3. In the window that appears, enter the name of the file with the extension .java.

  4. Left-click on the Ok button.

Add_new_java_code


After this, in the specified folder you will have a java file (indicated by the icon icon_new_Java_code), which can be opened by clicking on it 2 times with LMB or by clicking on it with RMB and in the drop-down list by clicking LMB on icon_opened_folder Open.

In the file that opens, you can write the necessary code.

Java_code_place


A list of the main java classes of the ru.biosoft.Physicell package, used to set custom cell behavior, and their brief description are presented below.

Classes of the ru.biosoft.Physicell package

Class

Description

VectorUtil

Working with vectors

Cell

Working with individual agents, e.g. cells

Phenotype

Working with various cell properties

CellDefinition

Working with Cell Types

Model

Working with a multicellular model for numerical calculations

Microenvironment

Working with the model environment in which cells and substances are located

RandomGenerator

Generating random variables in the model

PhysiCellConstants

Working with Constant Numerical Model Values

StandardModels

Working with standard cell cycle and cell death models

SignalBehavior

Controlling cell signaling and behavior

CellContainer

Obtaining information about the location of cells in the model lattice

CartesianMesh

Working with the Cartesian coordinate system in which cells and substrates are located

ModelReader

Reading a model from a text file

UpDownSignal

Calculation of the effect of the output signal according to multidimensional Hill’s law based on multiple input signal-effects

BasicSignaling

Working with methods that calculate the value of an output signal based on a single input signal

PhysiCellUtilities

Additional methods for working with the model

AgentColorer

Interface used to determine what color to draw a cell (its border, interior, core border, and core itself)

InitialCellsArranger

An abstract class that defines the initial arrangement of cells in the model. Can be used in the Initial Condition subtab of the Microenvironment tab.

O2based

Subclass UpdatePhenotype. Describes the standard life activity of a cell depending on the oxygen concentration.

Visualizer

Draws the result of model calculations.

ReportGenerator

Creates a tabular report during calculations with a separate row for each cell in the model. Can be used in the Model Report subtab of the Microenvironment tab.

CustomCellData

Contains custom parameters for a specific cell type. Filled in by the user in the Custom Data subtab of the Cell Types tab.

AgentColorerDefault

Standard implementation of the AgentColorer class. Colors the agent depending on its type and whether it is alive.

FalseCellCytometryVisualizer

Subclass AgentColorerDefault. Colors cells that have a life cycle of the Flow Cytometry model type depending on the current phase of the cell cycle.

StandardElasticContact

Standard implementation of the Contact class. Describes the elastic interaction of a cell with other cells.

Chemotaxis

Standard implementation of the UpdateMigrationBias class. Describes the movement of a cell along a gradient of one substrate.