Skip to content

Commit

Permalink
Restart handler: keep steps with the same id for the geo opt calculat…
Browse files Browse the repository at this point in the history
…ions.
  • Loading branch information
yakutovicha committed Mar 13, 2024
1 parent 0dadb7f commit 9f03c72
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion aiida_cp2k/workchains/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ def results(self):
trajectories = self._collect_all_trajetories()
if trajectories:
self.report("Work chain completed successfully, collecting all trajectories")
self.out("output_trajectory", utils.merge_trajectory_data_unique(*trajectories))
if self.ctx.inputs.parameters.get("GLOBAL", {}).get("RUN_TYPE") == "GEO_OPT":
output_trajectory = utils.merge_trajectory_data_non_unique(*trajectories)
else:
output_trajectory = utils.merge_trajectory_data_unique(*trajectories)
self.out("output_trajectory", output_trajectory)

def overwrite_input_structure(self):
if "output_structure" in self.ctx.children[self.ctx.iteration-1].outputs:
Expand Down

0 comments on commit 9f03c72

Please sign in to comment.