Files
leonarski_fandClaude Opus 5 edc042aadf Reindex into the ASU: follow the change of hand, not the hand landed on
ReindexMergedIntoAsu swapped I(+)/I(-) whenever the reindexed index came out on
the minus side of its Friedel pair. That is right only for a row that started on
the plus side, which is every row when merge_friedel is set - and none of the
problem cases.

With the mates kept apart, the merge stores the plus mate at +hkl_asu and the
minus mate at -hkl_asu (Merge.cpp), while RotationScaleMerge attaches I_plus /
I_minus in the plus convention on both rows alike, keying the lookup at
plus=true. An alternative-indexing operator is rotation-type, so op(-x) == -op(x)
and the two mates always land on opposite sides: testing key.plus alone therefore
swaps exactly one row of every pair, whichever way the operator went. The pair
ends up self-contradictory, and the mmCIF's pdbx_I_plus / pdbx_I_minus and the
F(+)/F(-) columns are swapped on half the rows.

Reached by "rugnux -A --model model.pdb" - -A clears MergeFriedel - on a crystal
whose indexing ambiguity the model resolves, which is the one path that both
keeps the mates apart and reindexes.

The swap now fires on was_plus != key.plus. With merge_friedel every row is
stored at the ASU representative, so was_plus is always true and this reduces to
the previous test; the existing change-of-hand case is unchanged.

The test that covered the merge_friedel=false path checked only I, so it passed
either way. The new one builds both mates of a pair and asserts they still agree
about which intensity is which afterwards - an invariant that holds however the
operator moves the hand, so it fails on the old code for either direction.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016L1qig74oYQzfUJJZbbxFh
2026-08-27 22:09:51 +02:00
..
2026-08-13 17:03:10 +02:00
2026-07-19 09:39:28 +02:00
2026-07-19 09:39:28 +02:00
2026-04-09 13:30:47 +02:00
2024-10-05 13:14:49 +02:00
2024-10-05 13:14:49 +02:00
2025-05-05 19:32:22 +02:00
2026-08-13 17:03:10 +02:00
2026-08-26 22:47:00 +02:00
2026-04-29 09:50:50 +02:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2026-08-25 08:21:39 +02:00
2026-08-25 08:21:39 +02:00
2026-05-28 18:48:35 +02:00
2025-05-05 19:32:22 +02:00
2025-06-10 18:14:04 +02:00
2026-06-08 08:30:35 +02:00
2025-11-19 09:40:50 +01:00
2026-04-29 09:50:50 +02:00
2026-08-25 08:21:39 +02:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2024-11-22 21:25:20 +01:00
2025-10-20 20:43:44 +02:00
2025-04-14 11:52:06 +02:00
2025-11-09 12:42:27 +01:00
2025-09-08 20:28:59 +02:00
2025-09-08 20:28:59 +02:00
2025-03-24 12:16:33 +01:00
2026-07-13 13:54:03 +02:00
2025-06-18 15:19:18 +02:00
2025-11-19 17:28:10 +01:00
2025-12-12 21:24:20 +01:00
2026-02-01 13:29:33 +01:00
2026-03-03 22:24:44 +01:00
2025-11-19 09:40:50 +01:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2025-05-05 19:32:22 +02:00
2024-11-22 21:25:20 +01:00
2026-08-26 22:47:00 +02:00
2026-08-25 08:21:39 +02:00
2024-11-22 21:25:20 +01:00
2025-05-28 18:49:27 +02:00
2026-06-23 20:29:49 +02:00
2026-08-25 08:21:39 +02:00
2024-11-22 21:25:20 +01:00
2026-08-13 17:03:10 +02:00
2025-03-02 13:15:28 +01:00
2026-06-08 08:30:35 +02:00
2026-08-25 08:21:39 +02:00
2025-11-09 12:42:27 +01:00
2026-08-13 17:03:10 +02:00
2024-11-22 21:25:20 +01:00
2025-11-09 12:42:27 +01:00
2025-10-01 22:54:40 +02:00
2025-10-20 20:43:44 +02:00
2026-07-13 13:54:03 +02:00
2026-08-13 17:03:10 +02:00
2026-06-23 20:29:49 +02:00
2026-06-23 20:29:49 +02:00
2026-06-23 20:29:49 +02:00
2026-06-02 11:49:24 +02:00
2026-08-13 17:03:10 +02:00
2026-08-26 22:47:00 +02:00
2026-08-26 22:47:00 +02:00
2026-08-25 08:21:39 +02:00
2026-08-25 08:21:39 +02:00
2026-03-02 15:57:12 +01:00
2025-11-09 12:42:27 +01:00
2025-11-09 12:42:27 +01:00
2026-07-11 07:19:11 +02:00
2026-06-23 20:29:49 +02:00
2026-04-16 11:59:59 +02:00
2026-06-23 20:29:49 +02:00
2025-11-02 13:45:57 +01:00
2025-12-12 21:24:20 +01:00
2026-05-28 18:48:35 +02:00
2026-08-13 17:03:10 +02:00
2026-08-25 08:21:39 +02:00
2026-03-05 22:13:12 +01:00
2026-03-26 20:50:33 +01:00
2024-11-22 21:25:20 +01:00
2026-08-13 17:03:10 +02:00