Skip to content

Hydrogen Normalization#1188

Merged
egonw merged 3 commits intomainfrom
h-convert
Mar 2, 2026
Merged

Hydrogen Normalization#1188
egonw merged 3 commits intomainfrom
h-convert

Conversation

@johnmay
Copy link
Copy Markdown
Member

@johnmay johnmay commented May 5, 2025

This overhauls the hydrogen suppression/contraction logic placing it all in one place and adding new useful functionality and fixes some corner case. We now have an enum which controls how you would like your hydrogens stored/represented it has 5 options which are summarised by this diagram (included in the JavaDoc):

htypes

WIP as I need to think about the logic for "unsafe" a bit more.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented May 6, 2025

@egonw
Copy link
Copy Markdown
Member

egonw commented Aug 20, 2025

@johnmay, is this one good to go too?

@johnmay
Copy link
Copy Markdown
Member Author

johnmay commented Aug 20, 2025

Not sure - lost track and need to review. Leave for now

johnmay added 2 commits March 2, 2026 13:58
…class (Hydrogens.java) keeping all the logic together. We also improve the logic such that the user can have a single entry point and they specify how they want their hydrogens.

I did flirt with the idea of making this very granualar (i.e. bitmask/enum set) but in the end I decided they are really only a few useful options and providing it's not too difficult to implement add any extra future logic that is okay. There are 5 options: Unsafe, Minimal, Explicit, Stereo, Depiction which do different things for different use cases (see doc).
@johnmay johnmay marked this pull request as ready for review March 2, 2026 14:16
@johnmay
Copy link
Copy Markdown
Member Author

johnmay commented Mar 2, 2026

Rebased - This is good to go now.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Mar 2, 2026

@egonw egonw merged commit 76aad0e into main Mar 2, 2026
12 of 13 checks passed
@johnmay johnmay deleted the h-convert branch March 3, 2026 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants