Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 13, 2024
1 parent d8b251b commit fedc7dd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions aiida_cp2k/parsers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,11 @@ def _parse_trajectory(self, structure):
for frame in parse(output_xyz_pos):
_, positions = zip(*frame["atoms"])
positions_traj.append(positions)
comment_split = frame["comment"].split(',')
comment_split = frame["comment"].split(",")
stepids_traj.append(int(comment_split[0].split()[-1]))
energy_index = next((i for i, s in enumerate(comment_split) if "E =" in s), None)
energy_index = next(
(i for i, s in enumerate(comment_split) if "E =" in s), None
)
energies_traj.append(float(comment_split[energy_index].split()[-1]))
positions_traj = np.array(positions_traj)
stepids_traj = np.array(stepids_traj)
Expand Down

0 comments on commit fedc7dd

Please sign in to comment.