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:
Right-click on the folder in the repository in which you want to create a java class.
In the drop-down list, click LMB on
New Java code.In the window that appears, enter the name of the file with the extension .java.
Left-click on the Ok button.
After this, in the specified folder you will have a java file (indicated by the icon
), 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
Open.
In the file that opens, you can write the necessary code.
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.
Class |
Description |
|---|---|
Working with vectors |
|
Working with individual agents, e.g. cells |
|
Working with various cell properties |
|
Working with Cell Types |
|
Working with a multicellular model for numerical calculations |
|
Working with the model environment in which cells and substances are located |
|
Generating random variables in the model |
|
Working with Constant Numerical Model Values |
|
Working with standard cell cycle and cell death models |
|
Controlling cell signaling and behavior |
|
Obtaining information about the location of cells in the model lattice |
|
Working with the Cartesian coordinate system in which cells and substrates are located |
|
Reading a model from a text file |
|
Calculation of the effect of the output signal according to multidimensional Hill’s law based on multiple input signal-effects |
|
Working with methods that calculate the value of an output signal based on a single input signal |
|
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. |