Compilation

Compile a PhysiCell project in PCMM. Includes the necessary compiler macros and checks PhysiCell version by the commit hash of the PhysiCell repository.

Public API

Private API

PhysiCellModelManager.addPhysiECMIfNeededMethod
addPhysiECMIfNeeded(S::AbstractSampling)

Check if the PhysiECM macro needs to be added for the sampling object S.

The macro will need to be added if it is not present AND either 1) the inputs includes ic_ecm or 2) the configuration file has ecm_setup enabled.

source
PhysiCellModelManager.addRoadRunnerIfNeededMethod
addRoadRunnerIfNeeded(S::AbstractSampling)

Check if the RoadRunner macro needs to be added for the sampling object S.

The macro will need to be added if it is not present AND either 1) the inputs defines an intracellular file with roadrunner intracellulars or 2) the configuration file has roadrunner intracellulars defined.

source
PhysiCellModelManager.compilerFlagsMethod
compilerFlags(S::AbstractSampling)

Generate the compiler flags for the given sampling object S.

Generate the necessary compiler flags based on the system and the macros defined in the sampling object S. If the required macros differ from a previous compilation (as stored in macros.txt), then recompile.

Returns

  • cflags::String: The compiler flags as a string.
  • recompile::Bool: A boolean indicating whether recompilation is needed.
  • clean::Bool: A boolean indicating whether cleaning is needed.
source
PhysiCellModelManager.libRoadRunnerOnPathMethod
libRoadRunnerOnPath(env_var::String, librr_lib_path::String; working_dir::String=physicellDir())

Check if the libRoadRunner library path is included in the environment variable.

The librr_lib_path must be an absolute path, and the function will resolve relative paths based on the working_dir. Returns true if the path is found, otherwise false.

source
PhysiCellModelManager.loadCustomCodeMethod
loadCustomCode(S::AbstractSampling[; force_recompile::Bool=false])

Load and compile custom code for a simulation, monad, or sampling.

Determines if recompilation is necessary based on the previously used macros. If compilation is required, copy the PhysiCell directory to a temporary directory to avoid conflicts. Then, compile the project, recording the output and error in the custom_codes folder used. Move the compiled executable into the custom_codes folder and the temporary PhysiCell folder deleted.

source
PhysiCellModelManager.writePhysiCellCommitHashMethod
writePhysiCellCommitHash(S::AbstractSampling)

Write the commit hash of the PhysiCell repository to a file associated with the custom code folder of the sampling object S.

If the commit hash has changed since the last write, if the repository is in a dirty state, or if PhysiCell is downloaded (not cloned), recompile the custom code.

source