Repository navigation
Conversation
The [Lv] placeholder stands for the N-terminal nitrogen, and its neighbours were always bonded to that nitrogen with a hardcoded single bond. A modification that needs a double bond or a charged nitrogen therefore could not be expressed, and writing one was silently wrong rather than an error: [Lv]=C produced exactly the same molecule as [Lv]C, an amine where an imine was intended, which passes a formula check because the two are isomers. Three changes: - the bond order is read from the modification instead of assumed, so [Lv]=C attaches through a double bond; - the [Fl] placeholders standing for the amine hydrogens are consumed by total bond order rather than by neighbour count, since a double bond uses up two hydrogens; - a formal charge on the placeholder transfers to the nitrogen, which is what allows it to end up as an aromatic ring nitrogen. All three are inert for existing data: every [Lv] modification currently in modification.tsv is neutral and singly bonded, so bond order equals neighbour count and the charge is zero. Verified by comparing the output for all 36 of them before and after; none changes. This enables two adduct classes that the aldehyde-derived probes produce, an imine and an N-aryl isoquinolinium. Co-Authored-By: Claude Opus 5 <[email protected]>
_has_n_term_mod_placeholder matched the literal string "[Lv]", so a charged placeholder such as [Lv+] was not recognised and the modification silently took the non-placeholder path, leaving the [Lv] atom in the product. Match on the atom symbol instead so both forms route through the placeholder logic. Co-Authored-By: Claude Opus 5 <[email protected]>
This was referenced Oct 14, 2026
GeorgWa
requested review from
boopthesnoot,
lucas-diedrich,
mo-sameh and
mschwoer
October 14, 2026 21:47
This branch has not been deployed
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.
Enables modifications that attach to the N-terminus with a double bond, such as an imine, or that carry a charge.
[Lv]stands for the N-terminal nitrogen, but its bond was always created as a neutral single bond. Writing[Lv]=Cwas silently wrong rather than an error: it produced an amine where an imine was meant.No change for existing data: all 36
[Lv]modifications are neutral and singly bonded, and their output is verified identical before and after.