Commit f879b48
authored
fix(jax): handle DPA-2 pbc/nopbc without mapping (#4363)
In the C++ API, generate the mapping for the no PBC and throw the error
for PBC. Considering I forgot setting `atom_modify map yes` when testing
it, others may also forget.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Introduced a function to determine if the model supports message
passing, enhancing the model's interface.
- Added a private member variable to facilitate message passing
functionality.
- Implemented unit tests for the `DeepPot` class, validating its
functionality under various conditions.
- **Bug Fixes**
- Improved error handling for TensorFlow function retrieval, ensuring
more specific exceptions are thrown.
- Enhanced compatibility with earlier model versions by managing
exceptions related to the new message passing variable.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>1 parent 031c3ce commit f879b48
File tree
4 files changed
+424
-1
lines changed- deepmd/jax/jax2tf
- source/api_cc
- include
- src
- tests
4 files changed
+424
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
297 | 303 | | |
298 | 304 | | |
299 | 305 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| 192 | + | |
| 193 | + | |
192 | 194 | | |
193 | 195 | | |
194 | 196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
67 | 73 | | |
68 | 74 | | |
69 | 75 | | |
| |||
72 | 78 | | |
73 | 79 | | |
74 | 80 | | |
75 | | - | |
| 81 | + | |
76 | 82 | | |
77 | 83 | | |
78 | 84 | | |
| |||
314 | 320 | | |
315 | 321 | | |
316 | 322 | | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
317 | 330 | | |
318 | 331 | | |
319 | 332 | | |
| |||
584 | 597 | | |
585 | 598 | | |
586 | 599 | | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
587 | 609 | | |
588 | 610 | | |
589 | 611 | | |
| |||
0 commit comments