for FireWorks to be maximally useful to me, I want to be able to use it to run calculations with completely different codes, with different environments. For that to work, I cannot set the environment in the my_qadapter.yaml file, but have to do it afterwards (otherwise I have to quit and restart the launcher with different qadapters for each job). I would like to be able to control everything from python input files, so it would work like this:
set_env = some_script_that_sets_the_correct_environment(‘my_shell_file’)
…(whatever other tasks will be in the firework)…
firework = Firework([set_env,
wflow = Workflow([firework], name=‘my job’)
However, while I can write a PyTask to do this (i.e. PyTask(code_to_run_subprocess_and_run_shell_script)), the environment changes apparently have no effect outside that one PyTask. Once the code goes on to the next task in the Firework, the environment has been reset.
Is there any way to achieve this?