Skip to content

Commit 460b1b9

Browse files
committed
Modified the way output is passed onto the next step in the script. Basically, got rid of the jobflow style. Also, added the return statements to the main function.
1 parent 1fd08b5 commit 460b1b9

File tree

1 file changed

+15
-19
lines changed

1 file changed

+15
-19
lines changed

src/ts-workflow-examples/geodesic_ts_with_hessian/using_mace.py

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -33,33 +33,29 @@ def main():
3333

3434
# Create NEB job
3535
job1 = strip_decorator(geodesic_job)(reactant, product, calc_kwargs=calc_kwargs)
36-
print(job1)
37-
logger.info("Created Geodesic job.")
38-
'''
36+
logger.info("Geodesic job done.")
37+
3938
# Create TS job with custom Hessian
40-
job2 = ts_job(job1.output['highest_e_atoms'], use_custom_hessian=True, **calc_kwargs)
41-
logger.info("Created TS job with custom Hessian.")
39+
job2 = strip_decorator(ts_job)(job1['highest_e_atoms'], use_custom_hessian=True, **calc_kwargs)
40+
logger.info("TS job with custom Hessian done.")
4241

4342
# Create IRC job in forward direction
44-
job3 = irc_job(job2.output['atoms'], direction='forward', **calc_kwargs)
45-
logger.info("Created IRC job in forward direction.")
43+
job3 = strip_decorator(irc_job)(job2['atoms'], direction='forward', **calc_kwargs)
44+
logger.info("IRC job in forward direction done.")
4645

4746
# Create IRC job in reverse direction
48-
job4 = irc_job(job2.output['atoms'], direction='reverse', **calc_kwargs)
49-
logger.info("Created IRC job in reverse direction.")
47+
job4 = strip_decorator(irc_job)(job2['atoms'], direction='reverse', **calc_kwargs)
48+
logger.info("IRC job in reverse direction done.")
5049

51-
# Combine jobs into a flow
52-
jobs = [job1, job2, job3, job4]
53-
flow = jf.Flow(jobs)
54-
logger.info("Jobs combined into a flow.")
50+
logger.info("All jobs executed successfully.")
5551

56-
# Execute the workflow locally
57-
responses = jf.managers.local.run_locally(flow)
58-
logger.info("Workflow executed successfully.")
59-
logger.info(f"Responses: {responses}")
60-
'''
52+
return [job1, job2, job3, job4]
6153

6254

6355
if __name__ == "__main__":
64-
main()
56+
job1, job2, job3, job4 = main()
57+
print('\n\n', job1)
58+
print('\n\n', job2)
59+
print('\n\n', job3)
60+
print('\n\n', job4)
6561

0 commit comments

Comments
 (0)