Describe the bug
Follow-up to #1042. On the branch that addresses it (linear_adapter_explicit_atom_map, PR #1044) an explicit atom_map is honored and different maps now give different geometries — but for one reaction a requested map returns no guess at all, and the adapter reports success regardless, simply returning fewer guesses than maps requested.
Measured on main @ 4d67ad4c with that branch merged, requesting one guess per distinct correspondence:
| reaction |
distinct maps |
guesses returned |
identical pairs |
CC[CH]C -> CCC[CH2] |
6 |
6 |
0 |
CC[CH]CC -> CCCC[CH2] |
6 |
6 |
0 |
CCC[CH2] -> CC[CH]C |
4 |
4 |
0 |
[CH2]CC -> C[CH]C |
2 |
2 |
0 |
[CH2]C(C)CC -> CC(C)[CH]C |
2 |
1 |
0 |
The last row is the problem. The two maps differ only in which of the two hydrogens on one carbon migrates, so they are about as similar as two paths of one reaction can be, yet one produces nothing. The failing one is the map closest to the identity:
map A = [2, 1, 0, 3, 4, 9, 11, 8, ...] guess produced
map B = [0, 1, 2, 3, 4, 5, 6, 8, ...] no guess
interpolate_isomerization raises for every weight on that path. The exception is caught, so nothing surfaces to the caller:
File "arc/job/adapters/ts/linear.py", line 1059, in execute_incore
xyzs = interpolate(rxn=rxn, weight=w, existing_xyzs=all_xyzs_so_far,
map_cache=map_cache, forced_atom_map=forced_atom_map)
File "arc/job/adapters/ts/linear.py", line 1813, in interpolate
return interpolate_isomerization(...)
How to reproduce
Request a guess per distinct atom map for [CH2]C(C)CC -> CC(C)[CH]C (intra_H_migration), enumerating the maps first and passing each one to the adapter as atom_map. One of the two comes back empty.
Expected behavior
- When a map is supplied explicitly and no guess survives for it, report that distinctly. An explicitly requested map returning nothing is a different situation from a derived map that happened not to work, and a caller iterating over maps cannot currently tell them apart without counting the results.
- Worth checking whether near-identity maps are the trigger. The same map failed before that branch existed, when I forced it by monkeypatching
map_rxn, so it looks like a property of the interpolation rather than of the new argument.
This is not a regression — the branch is a clear improvement on the previous behavior, where every requested map returned the same geometry. Filing it separately so it is not lost when that PR merges.
Installation information
- ARC
main @ 4d67ad4c with linear_adapter_explicit_atom_map merged
- Python 3.14, Linux
Describe the bug
Follow-up to #1042. On the branch that addresses it (
linear_adapter_explicit_atom_map, PR #1044) an explicitatom_mapis honored and different maps now give different geometries — but for one reaction a requested map returns no guess at all, and the adapter reports success regardless, simply returning fewer guesses than maps requested.Measured on
main@4d67ad4cwith that branch merged, requesting one guess per distinct correspondence:CC[CH]C -> CCC[CH2]CC[CH]CC -> CCCC[CH2]CCC[CH2] -> CC[CH]C[CH2]CC -> C[CH]C[CH2]C(C)CC -> CC(C)[CH]CThe last row is the problem. The two maps differ only in which of the two hydrogens on one carbon migrates, so they are about as similar as two paths of one reaction can be, yet one produces nothing. The failing one is the map closest to the identity:
interpolate_isomerizationraises for every weight on that path. The exception is caught, so nothing surfaces to the caller:How to reproduce
Request a guess per distinct atom map for
[CH2]C(C)CC -> CC(C)[CH]C(intra_H_migration), enumerating the maps first and passing each one to the adapter asatom_map. One of the two comes back empty.Expected behavior
map_rxn, so it looks like a property of the interpolation rather than of the new argument.This is not a regression — the branch is a clear improvement on the previous behavior, where every requested map returned the same geometry. Filing it separately so it is not lost when that PR merges.
Installation information
main@4d67ad4cwithlinear_adapter_explicit_atom_mapmerged