Skip to content

data: preserve CCD fallback after failed conformer embedding - #350

Closed
mjslee0921 wants to merge 1 commit into
bytedance:mainfrom
mjslee0921:preserve-ideal-on-embedding-failure
Closed

mjslee0921 wants to merge 1 commit into
bytedance:mainfrom
mjslee0921:preserve-ideal-on-embedding-failure

Conversation

@mjslee0921

Copy link
Copy Markdown

RDKit EmbedMolecule can return -1 when embedding fails without raising an exception. The CCD cache generator currently treats that return as success: it changes the selected conformer ID to -1, labels it rdkit, and sets every reference-coordinate mask entry to true. This can mark missing Ideal coordinates as valid.

Preserve the initialized Ideal conformer ID, type, and per-atom mask when the returned ID is negative. Successful embeddings still select the newly generated conformer and its all-valid mask; the existing exception fallback is unchanged.

Regression tests exercise the actual RDKit failure sentinel using inconsistent distance bounds, both partial and entirely missing Ideal coordinates, actual successful conformer generation, and the exception path. They check selected metadata, unchanged existing conformers, and atom-name mapping.

Validation: all four focused tests pass. Scoped repository hooks pass after adding the required license header.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@mjslee0921 mjslee0921 closed this Sep 20, 2026
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