PhysiCell
PhysiCell copied to clipboard
Passing in files and folders as command line arguments
Bottom line
Has anyone thought about passing in other files/folders at the command line rather than in the config file? I think it's going to be useful enough for me that I'll implement it in my own project, but just wondering if there's any advice out there to make it more readily merge-able into main.
Background
I'm finding it would be helpful to be able to pass in paths to folders/files as command line arguments into a PhysiCell executable, similar to what's already done with the configuration file. Basically, I want to avoid changing the configuration file just to change the files/folders it encodes (output folder, initial conditions, rules). I can get it to work with minor edits to main.cpp
for the output folder and configuration files, but it's a much bigger lift for the others requiring either
- a rewrite of
create_cell_types
andsetup_tissue
which are essentially "core" code though live incustom_modules
- a rewrite of
setup_cell_rules
andload_cells_from_pugixml
which arecore
andmodules
, respectively
Proposed solution
./project -c $(path_to_config) -o $(path_to_output) -i $(path_to_ic) -r $(path_to_rules)