Skip to content

Commit

Permalink
renamed stepids to steps in trejectories
Browse files Browse the repository at this point in the history
  • Loading branch information
cpignedoli committed Feb 4, 2025
1 parent ed0a9f5 commit 690c57d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion aiida_cp2k/utils/datatype_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ def _merge_trajectories_into_dictionary(*trajectories, unique_stepids=False):
# The other arrays are then also reduced to the unique stepids.
if unique_stepids:
stepids = np.concatenate([traj.get_stepids() for traj in trajectories], axis=0)
final_trajectory_dict["stepids"], unique_indices = np.unique(
final_trajectory_dict["steps"], unique_indices = np.unique(
stepids, return_index=True
)

Expand Down
5 changes: 3 additions & 2 deletions aiida_cp2k/workchains/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ def overwrite_input_structure(self):
if "output_structure" in self.ctx.children[self.ctx.iteration-1].outputs:
self.ctx.inputs.structure = self.ctx.children[self.ctx.iteration-1].outputs.output_structure

@engine.process_handler(priority=401, exit_codes=[
Cp2kCalculation.exit_codes.ERROR_OUT_OF_WALLTIME,
@engine.process_handler(priority=303, exit_codes=[
Cp2kCalculation.exit_codes.ERROR_OUTPUT_INCOMPLETE,
Cp2kCalculation.exit_codes.ERROR_OUT_OF_WALLTIME,
Cp2kCalculation.exit_codes.ERROR_SCF_NOT_CONVERGED,
Cp2kCalculation.exit_codes.ERROR_MAXIMUM_NUMBER_OPTIMIZATION_STEPS_REACHED,
], enabled=False)
Expand Down Expand Up @@ -124,6 +124,7 @@ def restart_incomplete_calculation(self, calc):
first_snapshot = None
try:
first_snapshot = int(params['MOTION']['MD']['REFTRAJ']['FIRST_SNAPSHOT']) + calc.outputs.output_trajectory.get_shape('positions')[0]
self.report(f"First snapshot changed from {int(params['MOTION']['MD']['REFTRAJ']['FIRST_SNAPSHOT'])} to {first_snapshot}")
if first_snapshot:
params = utils.add_first_snapshot_in_reftraj_section(params, first_snapshot)
except KeyError:
Expand Down

0 comments on commit 690c57d

Please sign in to comment.