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.addMacro — Method
addMacro(S::AbstractSampling, macro_name::String)Add a macro to the macros file for the sampling object S.
PhysiCellModelManager.addMacrosIfNeeded — Method
addMacrosIfNeeded(S::AbstractSampling)Check if the macros needed for the sampling object S are already present in the macros file.
PhysiCellModelManager.addPhysiECMIfNeeded — Method
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.
PhysiCellModelManager.addRoadRunnerIfNeeded — Method
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.
PhysiCellModelManager.compilerFlags — Method
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.
PhysiCellModelManager.executableExists — Method
executableExists(custom_code_folder::String)Check if the executable for the custom code folder exists.
PhysiCellModelManager.isPhysiECMInConfig — Method
isPhysiECMInConfig(S::AbstractSampling)Check if any of the simulations in S have a configuration file with ecm_setup enabled.
PhysiCellModelManager.isRoadRunnerInConfig — Method
isRoadRunnerInConfig(S::AbstractSampling)Check if any of the simulations in S have a configuration file with roadrunner intracellulars defined.
PhysiCellModelManager.isRoadRunnerInInputs — Method
isRoadRunnerInInputs(S::AbstractSampling)Check if the inputs for the sampling object S defines an intracellular file with roadrunner intracellulars.
PhysiCellModelManager.libRoadRunnerOnPath — Method
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.
PhysiCellModelManager.loadCustomCode — Method
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.
PhysiCellModelManager.prepareLibRoadRunner — Method
prepareLibRoadRunner()Prepare the libRoadRunner library for use with PhysiCell.
PhysiCellModelManager.readMacrosFile — Method
readMacrosFile(S::AbstractSampling)Read the macros file for the sampling object S into a vector of strings, one macro per entry.
PhysiCellModelManager.writePhysiCellCommitHash — Method
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.