Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Jacob Wilkins <46597752+oerc0122@users.noreply.github.com>
  • Loading branch information
ElliottKasoar and oerc0122 authored Sep 2, 2024
1 parent 5b6a18a commit 987317a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions janus_core/calculations/md.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ def _prepare_restart(self) -> None:
# Use restart_stem.name otherwise T300.0 etc. counts as extension
poss_restarts = restart_stem.parent.glob(f"{restart_stem.name}*.extxyz")
try:
last_restart = sorted(poss_restarts, key=getmtime)[-1]
last_restart = max(poss_restarts, key=getmtime)

# Read in last structure
self.struct = input_structs(
Expand All @@ -558,7 +558,7 @@ def _prepare_restart(self) -> None:
# Use restart_stem.name otherwise T300.0 etc. counts as extension
self.offset = int("".join(last_stem.split(f"{restart_stem.name}-")))

# Check "-"" not inlcuded in offset
# Check "-" not inlcuded in offset
assert self.offset > 0

except (ValueError, AssertionError) as e:
Expand Down

0 comments on commit 987317a

Please sign in to comment.