Seed H-abstraction TS reactive-core bonds per element - #1034
Open
calvinp0 wants to merge 1 commit into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1034 +/- ##
=======================================
Coverage 65.67% 65.67%
=======================================
Files 121 121
Lines 41018 41036 +18
Branches 10549 10553 +4
=======================================
+ Hits 26937 26950 +13
- Misses 11066 11068 +2
- Partials 3015 3018 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
… flat factor The A-H(*2) and H(*2)-B distances of an H_Abstraction TS guess were both set by multiplying the corresponding well bond length by 1.2. A single factor cannot be right for every element: it under-stretches a heavy X-H and, applied to the other end, is calibrated on nothing in particular. Seed each bond instead from the element that carries it, as the equilibrium X-H single bond length already available from get_single_bond_length() plus a per-element elongation. The elongations are medians of d - r_e(X-H) over 1670 DFT-optimized H_Abstraction transition states, conditioned on the donor element for the breaking bond and on the acceptor element for the forming bond, with r_e taken from the same tabulated source the code adds it back to. C, N, O and S carry entries; every other element takes the pooled defaults. Anchoring the elongation to the element's own X-H bond is what keeps the rule usable when the donor or the acceptor is itself a hydrogen: a forming H-H bond is seeded at 1.03 A rather than at 1.36 A, which a Morse curve for H2 prices at 53 kcal/mol of strain against a barrier of roughly 14. Mean absolute error against the 1670 reference distances falls from 0.067 A to 0.052 A overall, and from 0.110 A to 0.091 A on the 62 records in which the donor or the acceptor is a hydrogen. The gain is in the heavy-atom bulk; for the few diatomic-partner reactions the older multiplicative factor happened to sit closer to their own saddles. Passing r1_stretch or r2_stretch explicitly still selects the multiplicative path.
calvinp0
force-pushed
the
fix_h_abs_per_element_bond_lengths
branch
from
September 5, 2026 18:58
02f4cd7 to
b8a4107
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Seeds the two reactive-core bonds of an
H_AbstractionTS guess from the element that carries eachbond, instead of scaling both by a single factor.
The problem
combine_coordinates_with_redundant_atomsset both the A–H(*2) breaking bond and the H(*2)–Bforming bond to
1.2 ×the corresponding equilibrium single-bond length. One factor cannot suitevery element: applied to a heavy X–H it under-stretches the core, and applied to the other end it
is calibrated on nothing in particular.
What replaces it
get_h_abs_reactive_bond_length(symbol, bond)returnsget_single_bond_length(symbol, 'H')plus aper-element elongation — the breaking bond keyed on the donor A, the forming bond on the acceptor B.
The elongations are medians of
d − r_e(X–H)over 1670 DFT-optimised H-abstraction transitionstates, with
r_etaken from the same tabulated source the code adds it back to, so the rulereproduces each measured median to within 0.003 Å.
C, N, O and S carry entries; every other element takes the pooled defaults. Chlorine is not given an
entry — it appears once as an acceptor and never as a donor, which is an anecdote rather than a
median. Hydrogen needs no entry either: the elongation is added to its own
r_e(H–H) = 0.75, so thedefaults already yield 0.97 / 1.03 Å.
Subtracting
r_eleaves an elongation that is nearly element-free, which is Pauling's bond-orderrelation with a fitted order of n ≈ 0.43 (breaking) and n ≈ 0.34 (forming). The textbook n = 0.5
would give +0.18 Å; the data says +0.22 / +0.28. The CH₃ + CH₄ D₃d saddle at 1.34 Å is an
independent check — its elongation of 0.25 Å is the symmetric average of the two.
Conditioning on the donor–acceptor pair rather than on single elements was tested and rejected as
over-fitting: element-only residuals are ≤ 0.05 Å for every pair with n ≥ 80, and the larger
residuals occur only in cells of n ≤ 21.
Accuracy
Mean absolute error against all 1670 reference distances, both bonds:
1.2 ×multiplicativeThis is a net improvement, not a uniform one. For the smallest H-transfer systems the multiplicative
factor happened to sit closer to their own saddles — CH₄ + H has a true saddle at 1.383 / 0.904 Å
(verified in the reference set against a CCSD(T) 1.397 / 0.892), where
1.2 ×gives 1.311 / 0.897and this rule gives 1.310 / 1.030. The gain is in the heavy-atom bulk.
The forming elongation exceeds the breaking one because 70.3% of the reference set is written in the
exothermic direction. The asymmetry therefore describes a reaction written in the RMG template
direction and is not a property of the saddle, which is symmetric for a thermoneutral abstraction.
Passing
r1_stretchorr2_stretchexplicitly still selects the multiplicative path.Reuse
Searched before writing:
get_code_contextfor existing bond-length and reactive-core seeding,git grep -n "def get_single_bond_length", and the element data inarc/common.py. No new elementtable was added —
get_single_bond_lengthalready tabulatesr_e(X–H)for every element needed,and the elongation dictionaries hold only the four measured offsets. No geometry maths was
hand-rolled; the change is confined to the distances handed to
set_zmat_bond().Tests
Four new tests in
arc/job/adapters/ts/heuristics_test.pycovering a carbon acceptor, an oxygenacceptor, a hydrogen acceptor and a hydrogen donor, asserting the resulting seed distances.
48 pass in that file, serially and under
-n 4 --dist worksteal.Validated by mutation rather than coverage — five mutants, each killed by a test: flipping an
element branch, reverting to a flat 1.29 / 1.36, reverting to
1.2 ×, dropping ther1_stretch/r2_stretchescape hatch, and using the donor element for both bonds.🤖 Generated with Claude Code
https://claude.ai/code/session_01MbGeU8wLpafo3YFzTky2ho