Runner
Run simulations, monads, samplings, and trials in the PhysiCellModelManager.jl framework.
Public API
Base.run — Method
run(T::AbstractTrial[; force_recompile::Bool=false, prune_options::PruneOptions=PruneOptions()])`Run the given simulation, monad, sampling, or trial.
Call the appropriate functions to run the simulations and return the number of successful simulations. Also print out messages to the console to inform the user about the progress and results of the simulations.
Arguments
T::AbstractTrial: The trial, sampling, monad, or simulation to run.force_recompile::Bool=false: Iftrue, forces a recompilation of all files by removing all.ofiles in the PhysiCell directory.prune_options::PruneOptions=PruneOptions(): Options for pruning simulations.
PhysiCellModelManager.runAbstractTrial — Method
runAbstractTrial(T::AbstractTrial; force_recompile::Bool=false, prune_options::PruneOptions=PruneOptions())Deprecated alias for run, but only with this particular signature. Does not work on Cmd objects as Base.run is built for. Also, does not work with running sensitivity samplings.
PhysiCellModelManager.simulationIDs — Method
simulationIDs(output::PCMMOutput)Get the simulation IDs from the output of the PhysiCellModelManager.jl run.
Private API
PhysiCellModelManager.PCMMOutput — Type
PCMMOutput{T<:AbstractTrial}A struct to hold the output of the PhysiCellModelManager.jl run, including the AbstractTrial object, the number of scheduled simulations, and the number of successful simulations.
Fields
trial::T: The trial, sampling, monad, or simulation that was run.n_scheduled::Int: The number of simulations that were scheduled to run.n_success::Int: The number of simulations that were successfully completed.
PhysiCellModelManager.SimulationProcess — Type
SimulationProcessA struct to hold the simulation process and its associated monad ID. Users should not need to interact with this struct directly.
Fields
simulation::Simulation: The simulation object.monad_id::Int: The ID of the associated monad.process::Union{Nothing,Base.Process}: The process associated with the simulation. If the simulation process fails, e.g. if the command cannot be constructed, this will benothing.success::Bool: The success status of the simulation process. Set after the process has finished.
PhysiCellModelManager.collectSimulationTasks — Method
collectSimulationTasks(T::AbstractTrial[; force_recompile::Bool=false])Collect the simulation tasks for the given trial, sampling, monad, or simulation.
Arguments
T::AbstractTrial: The trial, sampling, monad, or simulation to collect tasks for.
Keyword Arguments
force_recompile::Bool=false: Iftrue, forces a recompilation of all files by removing all.ofiles in the PhysiCell directory.do_full_setup::Bool=true: Iftrue, performs a full setup of the simulation, including compiling code and preparing input files. Only used forAbstractMonadobjects.
PhysiCellModelManager.prepCmdForWrap — Method
prepCmdForWrap(cmd::Cmd)Prepare the command for wrapping in the sbatch command. This is a helper function to remove the backticks from the command string.
PhysiCellModelManager.prepareHPCCommand — Method
prepareHPCCommand(cmd::Cmd, simulation_id::Int)Prepare the command to run a simulation on an HPC system using sbatch. This function adds the necessary flags to the command and returns it as a Cmd object.
PhysiCellModelManager.prepareSimulationCommand — Method
prepareSimulationCommand(simulation::Simulation, monad_id::Int, do_full_setup::Bool, force_recompile::Bool)Internal function to prepare the command to run a simulation, including preparing input files and compiling the custom code if necessary.
PhysiCellModelManager.processSimulationTask — Method
processSimulationTask(simulation_task, prune_options)Process the given simulation task and return whether it was successful.
PhysiCellModelManager.resolveSimulation — Method
resolveSimulation(simulation_process::SimulationProcess, prune_options::PruneOptions)Resolve the simulation process by checking its success status, printing warnings if it failed, and pruning the simulation output if necessary.
PhysiCellModelManager.simulationFailed — Method
simulationFailed(simulation::Simulation, monad_id::Int)
simulationFailed(simulation_id::Int, monad_id::Int)Set the status code of the simulation to "Failed" and erase the simulation ID from the simulations.csv file for the monad it belongs to.
PhysiCellModelManager.trialID — Method
trialID(output::PCMMOutput)Get the ID of the trial from the output of the PhysiCellModelManager.jl run.
PhysiCellModelManager.trialType — Method
trialType(output::PCMMOutput)Get the type of the trial from the output of the PhysiCellModelManager.jl run.
PhysiCellModelManager.updateDatabaseOnCompletion — Method
updateDatabaseOnCompletion(simulation_id::Int, monad_id::Int, success::Bool)Update the database on completion of a simulation.