Minor clean up in SMILES Writing double bond canonicalization#8971
Merged
greglandrum merged 3 commits intordkit:masterfrom Dec 3, 2025
Merged
Minor clean up in SMILES Writing double bond canonicalization#8971greglandrum merged 3 commits intordkit:masterfrom
greglandrum merged 3 commits intordkit:masterfrom
Conversation
greglandrum
pushed a commit
that referenced
this pull request
Dec 30, 2025
* move firstVisitOrder into lambda * remove extra bond switch * modernize loop
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.
As I look through SMILES writing code for #8968, I'm noticing some things that can be cleaned up. In this PR I'm suggesting some minor refactors with no functional change:
firstVisitOrderdeclaration/reset into thefindNeighborBondslamba, since it's only used there, and it needs to be reset before each usage.! setFromBond1branch. This makes theE/TRANS/Z/CISdecision more intuitive, and also makes it simillar to the one in the other branch, making it easier to abstract into a separate function in a future refactor.atomBondsvariable by modernizing the loop where it is uses.