Skip to content

refactor(snap): simplify internals and tighten model parsing - #8287

Merged
mohanchen merged 3 commits into
deepmodeling:developfrom
19hello:feature/snap-review-domain-decomposition-split
Nov 4, 2026
Merged

mohanchen merged 3 commits into
deepmodeling:developfrom
19hello:feature/snap-review-domain-decomposition-split

Conversation

@19hello

@19hello 19hello commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Reminder

  • I have read AGENTS.md and docs/developers_guide/agent_governance.md.
  • No linked issue: this is a focused SNAP cleanup requested by a maintainer/user.
  • Focused SNAP unit tests were updated and run.
  • Exact verification commands and results are listed below.
  • User-visible model-file behavior change is described below.
  • Core module impact is described below.
  • No governance exception requested.

Linked Issue

No linked issue; this PR is a focused SNAP cleanup.

Unit Tests and/or Case Tests for my changes

  • Commands run: CCACHE_DISABLE=1 cmake --build build_parallel_md1_current --target MODULE_MD_SNAP_model MODULE_MD_SNAP_cg MODULE_MD_SNAP_descriptor MODULE_MD_SNAP_calculator -j4 — passed.
  • Commands run: 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_SNAP_' — 4/4 passed. The preload avoids a local mixed-BLAS gotoblas symbol error.
  • Commands run: git diff --check — passed; python3 tools/03_code_analysis/agent_governance_check.py --staged — no findings after the documentation update.
  • Checks not run: full ABACUS build and runtime/MPI integration tests; this patch only changes private names, SNAP model-file keyword acceptance, and unit tests.

What's changed?

  • Rename private SNAP recurrence, self-spectrum, and angular-order members without changing the mathematical implementation.
  • Replace two hard-coded external-reference assertions with an analytic order-zero bispectrum check, rotation/order invariance, force versus energy-gradient checks, zero total force, and the existing virial-versus-strain check. The removed reference values lacked a reproducible generation input in this repository; this PR does not claim independent cross-code numerical validation.
  • Stop accepting two previously ignored model-file keywords. Compatibility change: potential files containing chunksize or parallelthresh now fail with Unknown SNAP parameter; remove those lines before using such files.
  • Update the MD guide to reflect the parser behavior.

Governance Notes

  • INPUT/docs changes: no ABACUS INPUT metadata changes; the changed keywords belong to the SNAP potential parameter file, not INPUT. docs/advanced/md.md is updated.
  • Core module impact: limited to private names in source_md/module_snap and model-file parsing. No changes to MD domain decomposition or the SNAP numerical formulas.
  • Exceptions requested: none.

@mohanchen mohanchen added Refactor Refactor ABACUS codes MD & LAM MD and Larege Atomic Models labels Nov 4, 2026
@mohanchen
mohanchen merged commit 373b1d1 into deepmodeling:develop Nov 4, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

MD & LAM MD and Larege Atomic Models Refactor Refactor ABACUS codes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants