Repository navigation
fix(lammps): tally the global virial in deepmd/kk - #6153
Miller10101010 wants to merge 3 commits into
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
OutisLi
left a comment
There was a problem hiding this comment.
The FDOTR flag is the right fix. Please pin the pressure that the integrator actually sees with a regression test.
| reverse_used_host(false) { | ||
| respa_enable = 0; | ||
| // This style tallies the model virial explicitly, also for FDOTR requests. | ||
| no_virial_fdotr_compute = 1; |
There was a problem hiding this comment.
Please add a Newton-pair-on pressure regression to the CUDA Kokkos suite. Use zero velocities and a geometry with nonzero model stress, then compare the six thermo pressure components against ordinary deepmd or a model oracle. Cover a pure global-pressure request and a request that also needs per-atom virial; a Newton-off control would retain the existing behavior. The test should fail before this change and pass with it. The reported A800 run is useful, but without a regression this silent failure can return in NPT.
There was a problem hiding this comment.
Updated in c29de72.
Added a CUDA Kokkos regression that compares all six thermo pressure components to ordinary deepmd at zero velocity. It covers Newton pair on and off, with both a global-only request and a simultaneous per-atom centroid virial request. On an AISI A800 the regression passed with the fix. As a negative control, the adapter without the fix returned zero for all six components under Newton on; the reference included pxx = −2.644664 and pyy = 11.162216 bar.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6153 +/- ##
==========================================
- Coverage 78.09% 77.85% -0.24%
==========================================
Files 1214 1214
Lines 147782 147782
Branches 5246 5246
==========================================
- Hits 115410 115059 -351
- Misses 30392 30744 +352
+ Partials 1980 1979 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Kokkos can request a global virial through the force–position tally when Newton pair is enabled. Tell LAMMPS that this style tallies the model virial explicitly so that thermo pressure uses the model output.
Compared
deepmd/kkwithdeepmdon the same DPA4 configuration on an NVIDIA A800. Energy and diagonal pressure agreed for Newton on/off, with and without per-atom stress output (eight runs across both pair styles).Closes #5983.
Summary by CodeRabbit