Skip to content

Commit

Permalink
make irc_obj_dict optional in MolecularTSEstimate
Browse files Browse the repository at this point in the history
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
  • Loading branch information
sakim8048 authored and sakim8048 committed Apr 20, 2024
1 parent 8a5c2fc commit 5f15561
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions pynta/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand All @@ -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,
Expand Down

0 comments on commit 5f15561

Please sign in to comment.