Skip to content

Commit

Permalink
Simulations will now start from scratch if restart==True but no check…
Browse files Browse the repository at this point in the history
…point file is found
  • Loading branch information
mb2055 committed Nov 6, 2023
1 parent 9e66360 commit 7965730
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/somd2/runner/_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,12 +555,17 @@ def _run(sim):
)

if self._config.restart:
system = _stream.load(
str(
self._config.output_directory
/ self._fnames[lambda_value]["checkpoint"]
try:
system = _stream.load(
str(
self._config.output_directory
/ self._fnames[lambda_value]["checkpoint"]
)
).clone()
except:
_logger.warning(
f"Unable to load checkpoint file for λ={lambda_value}, starting from scratch."
)
).clone()
else:
system = self._system.clone()
if self._config.restart:
Expand Down

0 comments on commit 7965730

Please sign in to comment.