Commit e80e682
Keep both oxygens and the acyl carbon of a peroxy ester
A peroxy ester rendered as a prefix lost an oxygen and gained a carbon.
`-C(=O)-O-O-tBu` came out as `tert-butoxycarbonyl`, which is
`-C(=O)-O-tBu`, and the acyl carbon stayed in the parent chain on top of
that, so `COC(=O)CCC(=O)OOC(C)(C)C` was named
`methyl 4-(tert-butoxycarbonyl)butanoate` -- ten carbons and four oxygens
for a molecule with nine and five.
Two causes. `ester_prefix_handler` is shared with peroxy esters and spells
a single `…oxycarbonyl`; peroxy esters now get their own `…peroxycarbonyl`.
And `chain_external_carbonyl_groups` listed `ester` but not `peroxy_ester`,
so the acyl carbon was never moved out of the parent the way a plain ester's
is -- which is why the same molecule came out as a butanoate where the plain
ester gives a propanoate.
Of the three names this changes across 200k molecules, two go from wrong to
correct and none get worse; every probe round-trips through OPSIN. One
benzoyl peroxy ester still fails to name, but it failed before this change
too.
Refutations 24 -> 23. Both benchmarks otherwise unchanged.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 0379bd1 commit e80e682
3 files changed
Lines changed: 48 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
492 | 492 | | |
493 | 493 | | |
494 | 494 | | |
| 495 | + | |
| 496 | + | |
495 | 497 | | |
496 | 498 | | |
497 | 499 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
10 | 16 | | |
11 | 17 | | |
12 | 18 | | |
| |||
70 | 76 | | |
71 | 77 | | |
72 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
73 | 105 | | |
| 106 | + | |
| 107 | + | |
74 | 108 | | |
75 | 109 | | |
76 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5677 | 5677 | | |
5678 | 5678 | | |
5679 | 5679 | | |
| 5680 | + | |
| 5681 | + | |
| 5682 | + | |
| 5683 | + | |
| 5684 | + | |
| 5685 | + | |
| 5686 | + | |
| 5687 | + | |
| 5688 | + | |
| 5689 | + | |
| 5690 | + | |
0 commit comments