Skip to content

Commit

Permalink
Fix example_base_md_reftraj_restart.py
Browse files Browse the repository at this point in the history
  • Loading branch information
yakutovicha committed Mar 6, 2024
1 parent 3d548d5 commit dd773d0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions examples/workchains/example_base_md_reftraj_restart.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,20 +163,19 @@ def example_base(cp2k_code):
}

print("Submitted calculation...")
calc = engine.run(builder)
outputs, calc_node = engine.run_get_node(builder)

if "EXT_RESTART" in calc["final_input_parameters"].dict:
if "EXT_RESTART" in outputs["final_input_parameters"].dict:
print("OK, EXT_RESTART section is present in the final_input_parameters.")
else:
print(
"ERROR, EXT_RESTART section is NOT present in the final_input_parameters."
)
sys.exit(1)

stepids = np.concatenate(
[
called.outputs.output_trajectory.get_stepids()
for called in calc.called
for called in calc_node.called
if isinstance(called, orm.CalcJobNode)
]
)
Expand Down

0 comments on commit dd773d0

Please sign in to comment.