Skip to content

Commit 9ec10b2

Browse files
authored
Add files via upload
1 parent 7837642 commit 9ec10b2

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

multioptpy/Wrapper/mapper.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -602,11 +602,11 @@ def _kabsch_rmsd(pa: np.ndarray, pb: np.ndarray) -> float:
602602
U, S, Vt = np.linalg.svd(pb.T @ pa)
603603
d = np.linalg.det(U) * np.linalg.det(Vt)
604604

605-
if d < -0.1:
605+
if d < 0:
606606
return float("inf")
607607

608608
E0 = np.sum(pa ** 2) + np.sum(pb ** 2)
609-
rmsd_sq = max(0.0, E0 - 2.0 * (S[0] + S[1] + S[2])) / len(pa)
609+
rmsd_sq = max(0.0, E0 - 2.0 * (S[0] + S[1] + d * S[2])) / len(pa)
610610
return float(np.sqrt(rmsd_sq))
611611

612612

@@ -1072,6 +1072,13 @@ def _load(self) -> None:
10721072
if len(parts) < 4:
10731073
continue
10741074
try:
1075+
if not parts[0].startswith("EQ"):
1076+
logger.warning(
1077+
"ExploredPairsLog._load: unexpected prefix at %s:%d "
1078+
"(content=%r) — skipped.",
1079+
self._filepath, lineno, line,
1080+
)
1081+
continue
10751082
node_id = int(parts[0][2:])
10761083
atom_i = int(parts[1])
10771084
atom_j = int(parts[2])
@@ -2587,10 +2594,9 @@ def _try_submit() -> bool:
25872594
self.queue.release((task.node_id, tuple(task.afir_params)))
25882595
continue # try next task
25892596

2590-
# Valid task — submit it
2597+
25912598
self._iteration += 1
25922599
self.graph.last_iteration = self._iteration
2593-
25942600
run_dir = self._make_run_dir(task, iteration=self._iteration)
25952601
workspace = os.path.join(run_dir, "autots_workspace")
25962602
config = self._make_autots_config(task, workspace)
@@ -2613,6 +2619,7 @@ def _try_submit() -> bool:
26132619
self.queue.release((task.node_id, tuple(task.afir_params)))
26142620
pool_broken = True
26152621
return False
2622+
26162623
futures_map[future] = (
26172624
task, run_dir, self._iteration, gamma_sign, atom_i, atom_j
26182625
)

0 commit comments

Comments
 (0)