Skip to content

OneDFT: gradient support, atomic-grid models, and build fixes#192

Merged
awvwgk merged 1 commit intowavefunction91:skalafrom
tvogels:pr/vne3nn_v6_support
Apr 9, 2026
Merged

OneDFT: gradient support, atomic-grid models, and build fixes#192
awvwgk merged 1 commit intowavefunction91:skalafrom
tvogels:pr/vne3nn_v6_support

Conversation

@tvogels
Copy link
Copy Markdown

@tvogels tvogels commented Apr 7, 2026

This PR extends OneDFT integration with three main changes:

  1. EXC gradient support — Adds eval_exc_grad_onedft through the full integrator stack (host + device). A new CUDA kernel transforms OneDFT per-component Vxc into the format expected by the existing GGA/mGGA gradient kernels.

  2. Atomic-grid model inputs — Models that require per-atom grid features (atomic_grid_weights, atomic_grid_sizes) are now supported. In multi-rank MPI runs, gathered grid data is reordered from rank-order to atom-order before inference and gradients are reordered back before scatter.

  3. Build system fixes — The CMake OneDFT module now guards against duplicate nlohmann_json targets, strips PyTorch-injected -gencode flags from CMAKE_CUDA_FLAGS, and correctly propagates GAUXC_HAS_ONEDFT via the config header. Loaded TorchScript models are cached to avoid redundant disk reads.

Includes unit tests for the atom-reorder permutation logic and a carbon-atom gradient reference test.

@tvogels tvogels changed the title Add vne3nn_v6 non-local functional and gradient support Support for Skala/OneDFT models that require per-atom grids Apr 7, 2026
@tvogels tvogels changed the title Support for Skala/OneDFT models that require per-atom grids Support for atomic grid features and forces in the Skala branch. Apr 9, 2026
@tvogels tvogels force-pushed the pr/vne3nn_v6_support branch from 80356bd to 4668823 Compare April 9, 2026 11:18
@tvogels tvogels changed the title Support for atomic grid features and forces in the Skala branch. OneDFT: gradient support, atomic-grid models, and build fixes Apr 9, 2026
@awvwgk awvwgk added the Skala Related to the Skala exchange-correlation functional label Apr 9, 2026
@awvwgk awvwgk merged commit 08c3aa6 into wavefunction91:skala Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skala Related to the Skala exchange-correlation functional

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants