From 5f1556166f1bd7262bfb6dd2ab49e4780338f241 Mon Sep 17 00:00:00 2001 From: sakim8048 Date: Sun, 14 Apr 2024 18:26:59 -0700 Subject: [PATCH] make irc_obj_dict optional in MolecularTSEstimate fix typo add irc_mode to ts_task typo fixed (stupid uppercase)... typo fix delete empty IRC_obj_dict collect_firework() added again define IRC_obj_dict key value in run_task fix typo (case sensitive) add IRC_opj_dict in optional_params indentation fix define IRC_obj_dict key value in run_task fix typo (case sensitive) add IRC_opj_dict in optional_params indentation fix make irc_obj_dict optional in MolecularTSEstimate fix typo add irc_mode to ts_task typo fixed (stupid uppercase)... typo fix delete empty IRC_obj_dict collect_firework() added again --- pynta/tasks.py | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/pynta/tasks.py b/pynta/tasks.py index 7af419ef..21ca302d 100644 --- a/pynta/tasks.py +++ b/pynta/tasks.py @@ -617,7 +617,15 @@ def run_task(self, fw_spec): if spawn_jobs: print(irc_mode) - if irc_mode == "relaxed" or irc_mode == "fixed": + if irc_mode == "skip": + ctask = MolecularCollect({"xyzs":xyzsout,"check_symm":True,"fw_generators": ["optimize_firework",["vibrations_firework"]], + "fw_generator_dicts": [self["opt_obj_dict"],[self["vib_obj_dict"]]], + "out_names": ["opt.xyz",["vib.json"]],"future_check_symms": [True,False], "label": "TS"+str(index)+"_"+rxn_name}) + cfw = Firework([ctask],name="TS"+str(index)+"_"+rxn_name+"_collect",spec={"_allow_fizzled_parents": True, "_priority": 5}) + newwf = Workflow([cfw],name='rxn_'+str(index)+str(rxn_name)) + return FWAction(detours=newwf) #using detour allows us to inherit children from the original collect to the subsequent collects + + else: irc_obj_dict_forward = deepcopy(self["IRC_obj_dict"]) irc_obj_dict_forward["forward"] = True irc_obj_dict_reverse = deepcopy(self["IRC_obj_dict"]) @@ -629,17 +637,18 @@ def run_task(self, fw_spec): cfw = Firework([ctask],name="TS"+str(index)+"_"+rxn_name+"_collect",spec={"_allow_fizzled_parents": True, "_priority": 5}) newwf = Workflow([cfw],name='rxn_'+str(index)+str(rxn_name)) return FWAction(detours=newwf) #using detour allows us to inherit children from the original collect to the subsequent collects - - #if irc_mode == "skip": - else: - ctask = MolecularCollect({"xyzs":xyzsout,"check_symm":True,"fw_generators": ["optimize_firework",["vibrations_firework"]], - "fw_generator_dicts": [self["opt_obj_dict"],[self["vib_obj_dict"]]], - "out_names": ["opt.xyz",["vib.json"]],"future_check_symms": [True,False], "label": "TS"+str(index)+"_"+rxn_name}) - cfw = Firework([ctask],name="TS"+str(index)+"_"+rxn_name+"_collect",spec={"_allow_fizzled_parents": True, "_priority": 5}) - newwf = Workflow([cfw],name='rxn_'+str(index)+str(rxn_name)) - return FWAction(detours=newwf) #using detour allows us to inherit children from the original collect to the subsequent collects else: return FWAction() + +def collect_firework(xyzs,check_symm,fw_generators,fw_generator_dicts,out_names,future_check_symms,parents=[],label="",allow_fizzled_parents=False): + task = MolecularCollect({"xyzs": xyzs, "check_symm": check_symm, "fw_generators": fw_generators, + "fw_generator_dicts": fw_generator_dicts, "out_names": out_names, "future_check_symms": future_check_symms, "label": label}) + return Firework([task],parents=parents,name=label+"collect",spec={"_allow_fizzled_parents": allow_fizzled_parents,"_priority": 5}) + +def collect_firework(xyzs,check_symm,fw_generators,fw_generator_dicts,out_names,future_check_symms,parents=[],label="",allow_fizzled_parents=False): + task = MolecularCollect({"xyzs": xyzs, "check_symm": check_symm, "fw_generators": fw_generators, + "fw_generator_dicts": fw_generator_dicts, "out_names": out_names, "future_check_symms": future_check_symms, "label": label}) + return Firework([task],parents=parents,name=label+"collect",spec={"_allow_fizzled_parents": allow_fizzled_parents,"_priority": 5}) def collect_firework(xyzs,check_symm,fw_generators,fw_generator_dicts,out_names,future_check_symms,parents=[],label="",allow_fizzled_parents=False): task = MolecularCollect({"xyzs": xyzs, "check_symm": check_symm, "fw_generators": fw_generators,