We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 85d6524 commit 64def0eCopy full SHA for 64def0e
janus_core/calculations/md.py
@@ -808,7 +808,18 @@ def _prepare_restart(self) -> None:
808
restart_stem = self._restart_stem
809
810
# Use restart_stem.name otherwise T300.0 etc. counts as extension
811
- poss_restarts = restart_stem.parent.glob(f"{restart_stem.name}*.extxyz")
+ poss_restarts = list(
812
+ restart_stem.parent.glob(f"{restart_stem.name}*.extxyz")
813
+ )
814
+
815
+ # If no restarts found, check potential last results directory
816
+ if not poss_restarts:
817
+ results_dirs = sorted(restart_stem.parent.parent.glob("janus_results*"))
818
+ if results_dirs:
819
+ poss_restarts = results_dirs[-1].glob(
820
+ f"{restart_stem.name}*.extxyz"
821
822
823
try:
824
last_restart = max(poss_restarts, key=getmtime)
825
0 commit comments