fix(cc): fix spin model virial in C++ tests and LAMMPS integration#6
fix(cc): fix spin model virial in C++ tests and LAMMPS integration#6
Conversation
…n loss tests Co-authored-by: OutisLi <137472077+OutisLi@users.noreply.github.com>
…ted model Co-authored-by: OutisLi <137472077+OutisLi@users.noreply.github.com>
…ted model Co-authored-by: OutisLi <137472077+OutisLi@users.noreply.github.com>
Co-authored-by: OutisLi <137472077+OutisLi@users.noreply.github.com>
OutisLi
left a comment
There was a problem hiding this comment.
Did not pass the c++ unit tests
… path Co-authored-by: OutisLi <137472077+OutisLi@users.noreply.github.com>
Fixed in two commits:
|
… path Co-authored-by: OutisLi <137472077+OutisLi@users.noreply.github.com>
Co-authored-by: OutisLi <137472077+OutisLi@users.noreply.github.com>
…compute path Co-authored-by: OutisLi <137472077+OutisLi@users.noreply.github.com>
All C++ unit tests (ctest) pass — including the TF and PT spin virial tests. The remaining CI failure is In |
我就是让你修复pr-4545 这个base branch的错误啊,就是因为这个branch过不了unit tests。我在这个branch中增加了spin model的viral功能,但是就是一直过不了c++的测试,所以才让你修复啊 |
OutisLi
left a comment
There was a problem hiding this comment.
我就是让你修复pr-4545 这个base branch的错误啊,就是因为这个branch过不了unit tests。我在这个branch中增加了spin model的viral功能,但是就是一直过不了c++的测试,所以才让你修复啊
… into real atoms Co-authored-by: OutisLi <137472077+OutisLi@users.noreply.github.com>
…values Co-authored-by: OutisLi <137472077+OutisLi@users.noreply.github.com>
Fixed in
已修复。 Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Fixes all C++ unit test failures for the spin model virial feature added in pr-4545. The
deeppot_dpa_spin.pthmodel was regenerated with virial support, but several test files and the TF DeepSpin C++ backend had issues.Changes
source/api_c/tests/test_deepspin_a.ccandsource/api_c/tests/test_deepspin_a_hpp.cc— Updatedexpected_e,expected_f,expected_fmfor both PBC and NoPBC test fixtures, plus corrected model metadata assertions (cutoff: 6.0→4.0,numb_types: 2→3,type_map:"Ni O"→"Ni O H")source/api_cc/src/DeepSpinTF.cc— Fixed the lmp_nlist compute path to fold virtual atom virial back into real atoms, outputtingnall * 9instead ofextend_nall * 9. The previous sizing caused heap corruption (SIGABRT) in LAMMPS virial tests.source/api_cc/tests/test_deeppot_tf_spin.cc— Updatedcpu_lmp_nlist_atomictest to expect folded virial (natoms * 9size with virtual atom virial summed into corresponding real atoms)source/lmp/tests/test_lammps_spin.py— Updated expected virial values from 6-atom extended format to 4-atom folded format, fixing thetest_pair_deepmd_virialcrashsource/lmp/tests/test_lammps_spin_pt.py— Updated all expected values (expected_ae,expected_f,expected_fm,expected_v,expected_v2) to match the regenerated model, and fixed the virial sign conventionTesting
test_pair_deepmd_virial)test_pair_deepmd_virial)💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.