Compilation

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

Public API

Private API

pcvct.addMacroMethod
addMacro(S::AbstractSampling, macro_name::String)

Add a macro to the macros file for the sampling object S.

source
pcvct.addMacrosIfNeededMethod
addMacrosIfNeeded(S::AbstractSampling)

Check if the macros needed for the sampling object S are already present in the macros file.

source
pcvct.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
pcvct.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
pcvct.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
pcvct.executableExistsMethod
executableExists(custom_code_folder::String)

Check if the executable for the custom code folder exists.

source
pcvct.isPhysiECMInConfigMethod
isPhysiECMInConfig(S::AbstractSampling)

Check if any of the simulations in S have a configuration file with ecm_setup enabled.

source
pcvct.isRoadRunnerInConfigMethod
isRoadRunnerInConfig(S::AbstractSampling)

Check if any of the simulations in S have a configuration file with roadrunner intracellulars defined.

source
pcvct.isRoadRunnerInInputsMethod
isRoadRunnerInInputs(S::AbstractSampling)

Check if the inputs for the sampling object S defines an intracellular file with roadrunner intracellulars.

source
pcvct.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
pcvct.readMacrosFileMethod
readMacrosFile(S::AbstractSampling)

Read the macros file for the sampling object S into a vector of strings, one macro per entry.

source
pcvct.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