Deterministic kekulize, independent of atom and bond order (#9125)

* Make kekulization deterministic

* Add tautomer order-independence regression (python)

* Adjust tautomer tests for deterministic kekulization

* Update graphmol wedged-bond kekulization checks

* SmilesParse: update aromatic bond index expectations

* SmilesParse: refresh cxsmilesTest expected files

* Depictor: update testDepictor expected MolBlocks

* Depictor: update depictorCatch expectations

* Depictor Wrap: update expected MolBlock for pyDepictor

* MarvinParse: update testMrvToMol expected outputs

* FileParsers: refresh testAtropisomers expected outputs

* FileParsers: update tests for deterministic kekulization

* MolDraw2D: refresh brittle bond assertions

* RascalMCES: update expected cluster size

* MinimalLib: make cffi wedging check order-independent

* documentation fix

* MinimalLib: update Kekulé bond table in aligned-coords test

* Hoist duplicated lambdas to TEST_CASE scope

* Remove unused originalWedges variable

* Remove redundant bounds check; clarify wedge-end preference

* Pre-sort allAtms by wedge-end + rank

* Use mol.atomNeighbors() for neighbor iteration

* Check inAllAtms before linear-scanning done

* Drop redundant optsV/wedgedOptsV sorts

* Remove unused Canon.h include

* Add canonical parameter to Kekulize; skip ranking during sanitization

* Test canonical re-kekulization preserves stereo across atom orderings

* MinimalLib: update Kekulé bond orders in invertedWedges

* Change Kekulize canonical default to false, expose in Python wrappers

* keep rank order, push_back

* Revert "RascalMCES: update expected cluster size"

This reverts commit a81bb39495.

* docstring change

* expose new flag to python wrapper

* document changes in ReleaseNotes.md

* revert minimallib test changes again

* canonical = true defaults

* Revert "revert minimallib test changes again"

This reverts commit 039e1d84da.

* Reapply "RascalMCES: update expected cluster size"

This reverts commit 7b83a7a3e8.

---------

Co-authored-by: greg landrum <greg.landrum@gmail.com>
This commit is contained in:
Yakov Pechersky
2026-03-19 03:43:13 -04:00
committed by GitHub
parent 67b4555611
commit 0986d22c58
254 changed files with 2053 additions and 1785 deletions

View File

@@ -244,8 +244,8 @@ void markUnspecifiedStereoAsUnknown(int confId) {
}
/* From Kekulize.cpp, MolOps.h */
void Kekulize(bool markAtomsBonds=true, unsigned int maxBackTracks=100) {
RDKit::MolOps::Kekulize(*($self), markAtomsBonds, maxBackTracks);
void Kekulize(bool markAtomsBonds=true, bool canonical=true, unsigned int maxBackTracks=100) {
RDKit::MolOps::Kekulize(*($self), markAtomsBonds, canonical, maxBackTracks);
}
/* MolOps.h */