PhysiCell icon indicating copy to clipboard operation
PhysiCell copied to clipboard

Passing in files and folders as command line arguments

Open drbergman opened this issue 11 months ago • 0 comments

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

  1. a rewrite of create_cell_types and setup_tissue which are essentially "core" code though live in custom_modules
  2. a rewrite of setup_cell_rules and load_cells_from_pugixml which are core and modules, respectively

Proposed solution

./project -c $(path_to_config) -o $(path_to_output) -i $(path_to_ic) -r $(path_to_rules)

drbergman avatar Mar 08 '24 18:03 drbergman