Skip to content

Commit 3d9e3ce

Browse files
committed
f ts
1 parent e41ec6d commit 3d9e3ce

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

arc/checks/ts.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,10 @@ def _perceive_irc_fragments(xyz: dict,
574574
n_atoms = len(symbols)
575575

576576
dmat = xyz_to_dmat(xyz)
577-
bonds = get_bonds_from_dmat(dmat=dmat, elements=symbols)
577+
# Use n_fragments=0 to disable the heavy-atom bridging heuristic in
578+
# get_bonds_from_dmat, which would collapse genuinely multi-fragment
579+
# IRC endpoints (e.g., loose complexes) into a single component.
580+
bonds = get_bonds_from_dmat(dmat=dmat, elements=symbols, n_fragments=0)
578581

579582
# Find connected components via DFS
580583
adj = {i: set() for i in range(n_atoms)}
@@ -614,7 +617,10 @@ def _perceive_irc_fragments(xyz: dict,
614617

615618
# For multi-fragment systems, search over charge splits that sum to the total charge.
616619
# Prefer splits that minimize the total absolute charge (e.g., 0,0 over +1,-1).
617-
# Derive per-fragment charge bounds from total charge to handle |charge| > 2.
620+
# Cap at 4 fragments to keep the combinatorial search bounded;
621+
# more fragments likely indicates over-fragmentation from bond perception.
622+
if n_frags > 4:
623+
return None
618624
max_abs_charge = max(2, abs(charge) + 1)
619625
charge_range = range(-max_abs_charge, max_abs_charge + 1)
620626
best_mols = None

0 commit comments

Comments
 (0)