Skip to content

Full ETKDG v4 support - #388

Merged
scal444 merged 3 commits into
NVIDIA-BioNeMo:mainfrom
scal444:feat/etkdg-v4-ready
Nov 2, 2026
Merged

scal444 merged 3 commits into
NVIDIA-BioNeMo:mainfrom
scal444:feat/etkdg-v4-ready

Conversation

@scal444

@scal444 scal444 commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Wires up our new kernels for AIO and Gaussian torsions.

Closes #365, #366, #287

nvMolKit now accepts ETversion 4 on RDKit 2026.09 and later, with either
refinement and on every BFGS backend and precision. The ETK and
all-in-one kernels already evaluate Gaussian experimental torsions, so
embedding only needs RDKit's ETKDGv4 setup: prepareEmbedderArgs selects
the Gaussian force constants for the chosen refinement before building
the torsions, which RDKit scales by them, and then fills the lookup
tables.

Tests check that the prepared ETKDGv4 details carry RDKit's force
constants and torsion scalings for each refinement, embed small
molecules and one over 128 atoms with ETKDGv4 on the batched,
per-molecule and hybrid backends with both refinements and precisions
(checking bond lengths, with batches that let HYBRID reach the
per-molecule kernels), and compare all-in-one ETKDGv4 minimization with
RDKit on both backends. The Gaussian kernel tests now prepare their molecules
through prepareEmbedderArgs, and the Python embedding tests cover
ETKDGv4 with both refinements and its rejection on older RDKit.
The pipeline energy tests compared nvMolKit with RDKit only for the
ETKDG presets' default refinement, which is legacy for every preset
before ETKDGv4, and neither the C++ nor the Python comparisons included
ETKDGv4.

The C++ pipeline energy fixture now sets the refinement explicitly and
runs each preset with both legacy and all-in-one refinement on RDKit
2026.03.4 and later, and adds ETKDGv4 on RDKit 2026.09 and later. The
Python RDKit comparisons, serial and batched, add ETKDGv4 with both
refinements and skip it on older RDKit.
@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issues were found.

Summary

The PR enables ETKDGv4 with Gaussian torsions and adds tests for both legacy and all-in-one refinement.

  • ETKDGv4 molecules use Gaussian torsions during embedding.

Reviews (2) · Last reviewed commit: "Clarify that all RDKit ETKDG presets are..." · Reviewed by Greptile

@scal444
scal444 requested a review from evasnow1992 October 29, 2026 23:23
Comment thread nvmolkit/embedMolecules.py Outdated
- embedFragmentsSeparately is not supported. All fragments will be embedded together.
- Eigenvalue-based initialization supports at most 256 atoms per molecule.
- Only ETversion 1 and 2 are supported, so the ETKDGv4 preset raises ValueError.
- ETKDG versions 1 through 4 are supported. ETKDGv4 requires RDKit 2026.09 or later.

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.

We don't support ETKDG version 3 yet, right? Saying "versions 1 through 4" could be misleading.

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.

We support it all, the 1-2 thing was that there is no "ET" v3, ETKDGv3 usese ET v2. I'm rewording to just say we support it all.

@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.

The changes look good to me overall. Just one minor suggestion for the docstring update.

@scal444
scal444 merged commit 0b62b12 into NVIDIA-BioNeMo:main Nov 2, 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.

Support ETKDG V4 Gaussian params

2 participants