Skip to content

Support RDKit 2026.09 torsion parameters and owned embedding state - #364

Merged
scal444 merged 2 commits into
NVIDIA-BioNeMo:mainfrom
scal444:fix/rdkit-2026-09-compat
Oct 9, 2026
Merged

scal444 merged 2 commits into
NVIDIA-BioNeMo:mainfrom
scal444:fix/rdkit-2026-09-compat

Conversation

@scal444

@scal444 scal444 commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Accept both legacy cosine parameter pairs and the new torsion variant, with an explicit error for unsupported Gaussian parameters. Clone prepared embedding arguments, including owned internal coordinates, for each conformer attempt. Add regression coverage for both parameter forms and independent owned state.

Accept both legacy cosine parameter pairs and the new torsion variant, with an explicit error for unsupported Gaussian parameters. Clone prepared embedding arguments, including owned internal coordinates, for each conformer attempt. Add regression coverage for both parameter forms and independent owned state.

Validated with a local Release Conda build against RDKit 2026.09.1, CUDA 13.3, and an RTX 5080: GPU smoke and all four new regression cases pass; Python has 1032 passed, 85 skipped, and 20 long cases deselected. The C++ suite still has 12 failures involving reference expectations and ring-count limits. The Conda environment also required the missing upstream BoundsMatrixBuilderDetails.h header; that environment workaround is not included in this patch.
@scal444
scal444 requested a review from evasnow1992 October 9, 2026 16:22
@greptile-apps

greptile-apps Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[High impact] Adds version-specific RDKit state cloning for embedding.

The PR appears safe to merge, with a non-blocking request to test the owned-state path against RDKit 2026.09.

Findings

  1. P2 Owned-state tests stay skipped ▶

Summary

This PR accepts legacy cosine torsion parameters and their new variant form, rejects unsupported Gaussian parameters, and clones prepared embedding arguments for each conformer attempt.

  • Adds tests for both parameter forms and independent owned state.
  • The owned-state path still needs CI coverage with RDKit 2026.09 or newer.

Reviews (1) · Last reviewed commit: "Fix copyright and CMake formatting check..." · Reviewed by Greptile

Comment on lines +73 to +81
#if RDKIT_VERSION_MAJOR > 2026 || (RDKIT_VERSION_MAJOR == 2026 && RDKIT_VERSION_MINOR >= 9)
original.etkdgDetails.internalCoords = std::make_unique<RDKit::DGeomHelpers::InternalCoordinates>(3);
original.etkdgDetails.internalCoords->lengths = {1.1, 1.2, 1.3};
auto ownedCopy = nvMolKit::detail::cloneEmbedArgs(original);
ASSERT_NE(ownedCopy.etkdgDetails.internalCoords, nullptr);
EXPECT_NE(ownedCopy.etkdgDetails.internalCoords.get(), original.etkdgDetails.internalCoords.get());
EXPECT_EQ(ownedCopy.etkdgDetails.internalCoords->lengths, original.etkdgDetails.internalCoords->lengths);
ownedCopy.etkdgDetails.internalCoords->lengths[0] = 2.0;
EXPECT_DOUBLE_EQ(original.etkdgDetails.internalCoords->lengths[0], 1.1);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Owned-state tests stay skipped

The C++ test job installs RDKit 2025.09.1, and the other build matrices stop at RDKit 2026.3.5. They skip these internalCoords assertions and the new manual copy in cloneEmbedArgs. CI can pass without checking either against the release this PR supports. Add a build-and-test job using RDKit 2026.09 or newer that runs ClonesPreparedEmbedArgsForConformerAttempts.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add CI support for the new version, but this shouldn't block our release, and we need this commit for our release

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That’s fair — the CI gap does not block the compatibility fix from shipping, especially since you’re planning to add the RDKit 2026.09 job. I’ll treat this as a follow-up validation item rather than a release blocker; the concern is only that the internalCoords ownership path is currently compile-gated out of every existing test matrix.

@evasnow1992 evasnow1992 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good to me!

@scal444
scal444 merged commit 8488690 into NVIDIA-BioNeMo:main Oct 9, 2026
15 checks passed
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