Skip to content

[pull] master from deepmodeling:master - #264

Merged
pull[bot] merged 2 commits into
ishandutta2007:masterfrom
deepmodeling:master
Jul 13, 2026
Merged

[pull] master from deepmodeling:master#264
pull[bot] merged 2 commits into
ishandutta2007:masterfrom
deepmodeling:master

Conversation

@pull

@pull pull Bot commented Jul 13, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

njzjz and others added 2 commits July 13, 2026 01:24
## Summary
- export charge_spin-aware JAX SavedModel signatures only for models
that need charge/spin conditioning
- add Python and C++ JAX runtime fallback to stored default_chg_spin,
while keeping old SavedModel signatures compatible
- allow C++ header wrapper to broadcast one-frame charge_spin input
safely and add focused jax2tf regressions

## Tests
- ruff format .
- ruff check .
- pytest source/jax2tf_tests/test_make_model.py
source/jax2tf_tests/test_serialization.py
source/jax2tf_tests/test_tfmodel.py -q
- c++ -std=c++17 -Isource/api_c/include -fsyntax-only -x c++ ...
- c++ -std=c++17 -fsyntax-only ... source/api_cc/src/DeepPotJAX.cc

## Notes
- `cmake --build source/build --target deepmd_cc -j2` still fails before
compiling this change because local CMake TensorFlow detection stops at
`cmake/Findtensorflow.cmake:234 (file): file unknown error`.
- Review requested from @anyangml for charge_spin C++ runtime context
and @iProzd for charge_spin/DPA3 behavior.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added optional charge/spin conditioning across JAX evaluation, JAX→TF
SavedModel export, TensorFlow model wrapper, and C++/C-API interfaces.
* SavedModels now expose charge/spin support metadata (supported flag,
dimension, default values).
* Charge/spin inputs can be provided per frame or broadcast from a
single vector.
* **Bug Fixes**
* When charge/spin conditioning isn’t supported, provided inputs are
ignored with a warning.
* Improved handling of empty/unsupported charge/spin and clearer errors
for invalid shapes.
* **Tests**
* Added/extended tests covering forwarding, SavedModel export/import,
defaults, broadcasting, and validation across JAX/TF/C++.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Release Notes

* **New Features**
* Added `DPA4Wrapper`/`SeZMWrapper` integration for nvalchemi-toolkit
inference, including support for frozen `.pt2` packages.
* Added runnable water examples for single-point inference, NVE/NVT
molecular dynamics, and geometry relaxation.

* **Documentation**
* Added a third-party documentation page and an example README covering
setup, runtime options, and stress conventions.
  * Updated documentation navigation to include the new nvalchemi guide.

* **Bug Fixes / Improvements**
* Improved package import behavior with a clearer error and explicit
install instructions when the optional toolkit is unavailable.

* **Tests**
* Added comprehensive correctness tests comparing wrapper outputs to
toolkit-native neighbor-list execution.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@pull pull Bot locked and limited conversation to collaborators Jul 13, 2026
@pull pull Bot added the ⤵️ pull label Jul 13, 2026
@pull
pull Bot merged commit c0ad8bf into ishandutta2007:master Jul 13, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants