Skip to content

refactor(ase): consume external abacuslite plugin - #8175

Open
QuantumMisaka wants to merge 17 commits into
deepmodeling:developfrom
QuantumMisaka:integrate/external-abacuslite
Open

QuantumMisaka wants to merge 17 commits into
deepmodeling:developfrom
QuantumMisaka:integrate/external-abacuslite

Conversation

@QuantumMisaka

@QuantumMisaka QuantumMisaka commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

Reminder

  • I have read AGENTS.md and docs/developers_guide/agent_governance.md.
  • I have linked an issue or explained why this PR does not need one.
  • I have added adequate unit tests and/or case tests, or explained why not.
  • I have listed the exact verification commands run and their results.
  • I have described user-visible behavior changes, including INPUT parameter changes.
  • I have explained core-module impact for ESolver, HSolver, ElecState, Hamilt, Operator, Psi, or other source/ changes.
  • If this changes interfaces/ASE_interface/, source/source_relax/socket_*, or the socket metadata schema, I linked the abacuslite counterpart and updated the compatibility contract.
  • I have requested any needed governance exception below.

Linked Issue

Fix #8165. This PR implements the fully external direction agreed in that issue. LTS workflow adoption will be tracked in a separate follow-up.

ABACUS-side counterpart: QuantumMisaka/abacuslite#5.

Unit Tests and/or Case Tests for my changes

  • Commands run:
    • cd interfaces/ASE_interface/tests && conda run -n atst-dev python -m unittest test_external_provenance test_harness_facts test_native_md_fixture test_portable_runner -v
    • conda run -n atst-dev python -m py_compile interfaces/ASE_interface/tests/*.py
    • conda run -n atst-dev python -c "import yaml; yaml.safe_load(open('.github/workflows/ase_plugin_test.yml'))"
    • git diff --check
  • Result summary: 16 offline harness tests passed, including the new failed-leader process-group regression under installed abacuslite 1.1.0; Python compilation, workflow YAML parsing and diff checks passed. The new SocketDriverTest.PropertiesMetadataDeclaresVersionedSchema covers the v1 schema string.
  • Docs link fix: the first Read the Docs build failed because MyST treated the out-of-tree interfaces/ASE_interface/README.md relative link as a Sphinx cross-reference. The link now targets the GitHub tree, and no relative .md target remains in ase.md.
  • Checks not run locally, with reason: no local ABACUS executable/build was available, so CTest and the nine real-engine cases were not run locally. The hosted Atomic Simulation Environment (ASE) Interface Test / abacuslite external job passed on run 39146599381, including SCF, ASE relax/MD, native MD, band, magnetic and socket checks. Both Read the Docs builds also passed after the link fix.

What's changed?

  • Remove the vendored interfaces/ASE_interface/abacuslite package, its pyproject.toml, examples and internal developer guide. The plugin is now fully external; it is neither vendored nor a git submodule, so source archives remain complete.
  • Keep interfaces/ASE_interface/tests as the engine-owned compatibility harness. It imports the installed abacuslite distribution, verifies provenance and wheel/runtime identity, and runs SCF, ASE relax/MD, native MD, band, magnetic and socket checks.
  • Make the ASE CI workflow external-only: it installs the published abacuslite==1.1.0 wheel (SHA256 pinned) or a reviewed candidate ref, builds ABACUS, and runs every required case. A weekly schedule supplements PR checks.
  • Document abacus.socket.properties.v1 comprehensively: additive fields stay in v1; a breaking change needs a new schema version and a transition in both ABACUS and abacuslite. Add kPropertiesSchema and an engine-side contract test.
  • Add a PR-template reminder to link the abacuslite counterpart for ASE/socket changes.
  • Point user installation and examples to the abacuslite package/repository.

Governance Notes

  • INPUT/docs changes: docs/advanced/interface/ase.md, interfaces/ASE_interface/README.md and interfaces/README updated. No INPUT parameter metadata or generated documentation changes.
  • Core module impact: source/source_relax/socket_utils.{h,cpp} only moves the existing schema literal into kPropertiesSchema; wire values and numerical behavior are unchanged. No ESolver, HSolver, ElecState, Hamilt, Operator or Psi changes.
  • Exceptions requested: none.

@QuantumMisaka QuantumMisaka added Compile & CICD & Docs & Dependencies Issues related to compiling ABACUS Interfaces Interfaces with other packages Tests/Examples Issues/PR related to unit tests and integrate tests labels Oct 18, 2026

@ABACUS-PR-BOT ABACUS-PR-BOT left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Static review of 6b37c6b1c5e168540540f11f80974298cc64ff42. Two nonblocking follow-ups below. No builds or runtime tests were run, and CI was not independently verified.

Comment thread docs/advanced/interface/ase.md Outdated
Comment thread interfaces/ASE_interface/tests/run_engine_compatibility.py
mohanchen and others added 4 commits October 19, 2026 08:45
The retained paragraph claimed that starting MD from Python is unsupported, but the engine harness now requires native_md.py (engine runs its own MD, plugin reads the trajectory) alongside the ASE-driven Langevin case. State both validated paths and keep calculation types outside the plugin surface out of scope.
capture() only signalled the isolated group on timeout. When a case exited nonzero while a descendant stayed in the group, the runner returned and later cases could start beside the leftover. Check the group after any exit, escalate SIGTERM to SIGKILL, and reap it. Add a regression where the leader exits nonzero before a SIGTERM-ignoring child.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Compile & CICD & Docs & Dependencies Issues related to compiling ABACUS Interfaces Interfaces with other packages Tests/Examples Issues/PR related to unit tests and integrate tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

abacuslite should be independent repo as submodule in abacus/interfaces

3 participants