Repository navigation
Conversation
added 12 commits
November 10, 2026 17:53
…potential-esolver
…potential-esolver
…potential-esolver
mohanchen
reviewed
Nov 13, 2026
ABACUS-PR-BOT
left a comment
Collaborator
There was a problem hiding this comment.
The refactor changes the reduction domain for MDCells created with a custom communicator; the normal Run_MD world-communicator path does not trigger this issue. Inline feedback also covers two nonblocking cleanup items.
Static review of 1401e74bbf25c669f080872cbb32d3da7d4d37b6 against fcd57f6db2660a2d82bd66dfbc93d78e802600c5. git diff --check passed. No build or runtime/MPI checks were run; CI verification was unavailable, and the extra SNAP reference digits were not regenerated.
added 7 commits
November 15, 2026 21:26
…potential-esolver
mohanchen
reviewed
Nov 16, 2026
mohanchen
approved these changes
Nov 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reminder
AGENTS.mdanddocs/developers_guide/agent_governance.md.Linked Issue
No issue linked; developer-requested ESolver refactor.
Unit Tests and/or Case Tests for my changes
Commands run on the final branch:
cmake -S . -B build_parallel_md1_current -DBUILD_TESTING=ON— passed.cmake --build build_parallel_md1_current -j12 --target MODULE_MD_LJ_potential MODULE_MD_SNAP_potential MODULE_MD_DP_potential MODULE_MD_NEP_potential MODULE_MD_fire MODULE_MD_verlet MODULE_MD_nhc MODULE_MD_msst MODULE_MD_lgv— passed (the LJ target was rebuilt after consolidating its tests).OMP_NUM_THREADS=1 ctest --test-dir build_parallel_md1_current --output-on-failure -R '^MODULE_MD_(LJ_potential|SNAP_potential|DP_potential|NEP_potential|func|run|fire|verlet|nhc|msst|lgv)$'— 11/11 passed.cmake -S . -B build_abacus_nep_gnu -U ENABLE_RAPIDJSON -DBUILD_TESTING=ON— passed with DeePMD and NEP enabled.cmake --build build_abacus_nep_gnu -j12 --target MODULE_MD_DP_potential MODULE_MD_NEP_potential— passed.OMP_NUM_THREADS=1 LD_LIBRARY_PATH=/home/fy19/abacus-develop/.venv-deepmd/lib/python3.10/site-packages/deepmd_kit.libs:/home/fy19/abacus-develop/.venv-deepmd/lib/python3.10/site-packages/tensorflow LD_PRELOAD=/usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblas.so.0 ctest --test-dir build_abacus_nep_gnu --output-on-failure -R '^MODULE_MD_(DP|NEP)_potential$'— 2/2 passed.cmake --build build_abacus_nep_gnu -j12 --target abacus_basic_para— passed.python3 tools/03_code_analysis/agent_governance_check.py --base origin/develop --head HEAD --format text— passed, warnings only; global dependency count decreased by 20 references.git diff --check origin/develop...HEAD— passed.For each isolated case directory below, ran the same final
build_abacus_nep_gnu/abacus_basic_parabinary withOMP_NUM_THREADS=1, the DeePMD library path, and system OpenBLAS preloaded. All exited successfully:tests/04_FF/03_LJ_FIREtests/04_FF/102_SNAP_basetests/04_FF/101_NEP_HfO2tests/04_FF/50_DP_AlChecks not run on the final branch: multi-rank DeePMD MDCell, because the installed DeePMD-kit lacks a communication-capable
InputNlistconstructor. LJ, NEP and SNAP two-rank runtime checks passed before the latest develop merge and were not repeated after it.What's changed?
esolver_forcefieldsadapter for LJ, DeePMD, NEP and SNAP energy/force/stress handling.source_md/module_lj,module_dp,module_nepandmodule_snap.initialize(BaseCell&, const Input_para&)andcompute(BaseCell&, energy, force, stress). MDCell implementations write atom forces directly.source_md/unittestslayout.STRU.cifoutput; pass output directory and log stream explicitly into LJ instead of reading globals inside it.Governance Notes
source_esolverowns only dispatch and result reporting; potential calculation logic lives insource_md. Remaining global reads are at the factory/test boundary; the PR-level global dependency budget is reduced by 20.CI follow-up (2026-11-13)
MODULE_MD_funcand passed its CTest target.MODULE_MD_SNAP_potentialcreate its model files undertesting::TempDir(), removing its source-tree path dependency. Locally rebuilt the target and passedOMP_NUM_THREADS=1 ctest --test-dir build_parallel_md1_current --output-on-failure -R '^MODULE_MD_SNAP_potential$'. The subsequent CIModule_MD Unittestsstep passed.std::setprecision(16)), while the existing 105/106 regression references retained the prior six-decimal LAMMPS value. Both calculations reported54.90956145eV and18.30318715eV/atom; the difference from the rounded reference exceeded the existing1e-7eV threshold. Updated only these two energy references to the reported precision. The independent six-decimal LAMMPS value remains documented, and force/stress references and thresholds are unchanged.cmake --build build_parallel_md1_current -j12 --target abacus_basic_para— passed.OMP_NUM_THREADS=1 LD_PRELOAD=/usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblas.so.0 bash ../integrate/Autotest.sh -a /home/fy19/abacus-develop/build_parallel_md1_current/abacus_basic_para -n 4 -r '^(105_SNAP_quad|106_SNAP_scf)$' -j 1fromtests/04_FF— passed (8/8 property checks). Sandbox MPI launch could not create sockets; an unrestricted first run exposed the local BLASgotoblassymbol mismatch, resolved by preloading the system OpenBLAS for this verification run.python3 tools/03_code_analysis/agent_governance_check.py --stagedandgit diff --cached --check— passed for both follow-up commits. Full CI rerun for the final commit1401e74bbpassed: Integration Test and Unit Test (includingModule_MD Unittestsand04_FF), CUDA Test, both Build Test workflows, Pyabacus Build and Test, ASE Plugin Test, Precommit, and Agent Governance.Review follow-up (2026-11-15)
esolver_forcefields; the filename, class, factory, CMake, and legacy Makefile entries match. No INPUT behavior changed, so no user documentation change is needed.ModuleBase::CommunicationDomain; the old world reduction could mix independent cells. Added an MPI LJ regression usingMPI_COMM_SELFon four world ranks. This is a focused MPI unit test: Autotest cannot construct an MDCell on an isolated communicator.ModuleBase::matrixinsource_md/potential.h;module_lj/lj.hincludes the full header because it stores matrix values. LJ, DP, and NEP now log the absoluteSTRU.cifpath after writing.cmake --build build_parallel_md1_current -j12 --target abacus_basic_parapassed;OMP_NUM_THREADS=1 ctest --test-dir build_parallel_md1_current --output-on-failure -R '^MODULE_MD_(LJ|SNAP|DP|NEP)_potential$'passed 4/4;OMP_NUM_THREADS=1 ctest --test-dir build_parallel_md1_current --output-on-failure -R '^MODULE_MD_LJ_potential_mpi_np4$'passed 1/1 outside the sandbox;OMP_NUM_THREADS=1 LD_PRELOAD=/usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblas.so.0 ctest --test-dir build_parallel_md1_current --output-on-failure -R '^04_FF$'passed 1/1 outside the sandbox. The local executable reportedABACUS version v3.11.0-beta13with the same OpenBLAS preload.cmake --build build_abacus_nep_gnu -j12 --target MODULE_MD_DP_potential MODULE_MD_NEP_potentialand its focused CTest run passed 2/2 before the final call-site-only cleanup.python3 tools/03_code_analysis/agent_governance_check.py --base origin/develop --head HEAD --format textpassed with warnings only; global dependency references remain down by 20. The new LJ header needs the complete matrix type for value members.git diff --check origin/develop...HEADpassed.CI follow-up (2026-11-15)
Module_MD Unittests, but04_FFfailed in five LJ cases becauseCifParser::writecreatesSTRU.cifonly on world rank 0 while the new absolute-path confirmation calledrealpathon every rank. Nonzero ranks could check the path before the file existed. Commit177d13553limits path resolution and confirmation to the writing rank; it does not change the CIF contents or physics.cmake --build build_parallel_md1_current -j12 --target abacus_basic_paraandOMP_NUM_THREADS=1 LD_PRELOAD=/usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblas.so.0 ctest --test-dir build_parallel_md1_current --output-on-failure -R '^04_FF$'passed locally. This is the existing Autotest integration suite; no new integration driver was needed. Final CI rerun for177d13553passed: Integration Test and Unit Test (includingModule_MD Unittestsand04_FF), CUDA Test, both Build Test workflows, Pyabacus Build and Test, ASE Plugin Test, Precommit, and Agent Governance.Develop sync (2026-11-15)
origin/developat173620a12einto the PR branch asda8e889acwithout conflicts or force-push. The incoming change concerns DFT+U and does not alter this PR's force-field code.cmake --build build_parallel_md1_current -j12 --target abacus_basic_para MODULE_MD_LJ_potential MODULE_MD_SNAP_potential MODULE_MD_DP_potential MODULE_MD_NEP_potential MODULE_MD_LJ_potential_mpi MODULE_PW_dftu_base_test— passed.OMP_NUM_THREADS=1 ctest --test-dir build_parallel_md1_current --output-on-failure -R '^(MODULE_MD_(LJ|SNAP|DP|NEP)_potential|MODULE_PW_dftu_base_test)$'— MD 4/4 passed; DFT+U initially failed due to the local BLASgotoblassymbol mismatch. Repeating the DFT+U test withLD_PRELOAD=/usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblas.so.0passed 1/1.OMP_NUM_THREADS=1 LD_PRELOAD=/usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblas.so.0 ctest --test-dir build_parallel_md1_current --output-on-failure -R '^(MODULE_MD_LJ_potential_mpi_np4|04_FF)$'— passed 2/2 outside the sandbox.git diff --check origin/develop...HEADandpython3 tools/03_code_analysis/agent_governance_check.py --base origin/develop --head HEAD --format text— passed; governance warnings only.Header naming follow-up (2026-11-16)
source/source_md/potential.htoforcefield.h, updated its include guard and all direct includes. This commit only renamed the header; the subsequent class rename is described below. Neither change affects INPUT or user-facing documentation.forcefield.hbecause they derive from the completeModuleMD::Potentialtype; these are replacements for their previouspotential.hincludes, not additional dependencies.cmake --build build_parallel_md1_current -j12 --target abacus_basic_para MODULE_MD_LJ_potential MODULE_MD_SNAP_potential MODULE_MD_DP_potential MODULE_MD_NEP_potential— passed.OMP_NUM_THREADS=1 ctest --test-dir build_parallel_md1_current --output-on-failure -R '^MODULE_MD_(LJ|SNAP|DP|NEP)_potential$'— passed 4/4.python3 tools/03_code_analysis/agent_governance_check.py --staged— passed with warnings only;git diff --cached --check— passed.Base class naming follow-up (2026-11-16)
ModuleMD::PotentialtoModuleMD::ForceFieldinforcefield.h; updated all four derived classes, the ESolver adapter/factory, and the affected LJ tests. The concrete class names and numerical algorithms are unchanged. This is an internal C++ interface rename; no INPUT or user-facing documentation change is needed.cmake --build build_parallel_md1_current -j12 --target abacus_basic_para MODULE_MD_LJ_potential MODULE_MD_SNAP_potential MODULE_MD_DP_potential MODULE_MD_NEP_potential MODULE_MD_LJ_potential_mpi— passed.OMP_NUM_THREADS=1 LD_PRELOAD=/usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblas.so.0 ctest --test-dir build_parallel_md1_current --output-on-failure -R '^(MODULE_MD_(LJ|SNAP|DP|NEP)_potential|MODULE_MD_LJ_potential_mpi_np4|04_FF)$'— passed 6/6 outside the sandbox.python3 tools/03_code_analysis/agent_governance_check.py --staged— passed with a documentation-review warning;git diff --cached --check— passed.