Skip to content

Fix and harden abacuslite ASE interface#7588

Merged
mohanchen merged 4 commits into
deepmodeling:developfrom
QuantumMisaka:feat/abacuslite
Jul 6, 2026
Merged

Fix and harden abacuslite ASE interface#7588
mohanchen merged 4 commits into
deepmodeling:developfrom
QuantumMisaka:feat/abacuslite

Conversation

@QuantumMisaka

Copy link
Copy Markdown
Collaborator

Summary

This PR hardens the vendored abacuslite ASE interface and ports the ATST-Tools fixes that are suitable for upstream ABACUS:

  • Preserve numbered backups without clobbering existing *.bak.N files and ignore non-canonical suffixes.
  • Remove unsupported dipole from the advertised ASE implemented properties.
  • Detect contradictory property-derived and user-provided ABACUS keywords.
  • Preserve first-occurrence species order when writing STRU files and map FixAtoms / FixCartesian ASE constraints to ABACUS mobility flags.
  • Make legacy band parsing tolerate non-band rows while preventing cross-k-point block misreads, and keep magmom result reordering consistent with atoms/forces.

Fixes #7540
Fixes #7544
Fixes #7546

Tests

Run from interfaces/ASE_interface/abacuslite after python3 -m pip install -e ../ --no-deps:

  • python3 ./io/generalio.py -v
  • python3 ./io/legacyio.py -v
  • python3 ./io/latestio.py -v
  • python3 ./utils/ksampling.py -v
  • python3 core.py TestAbacusCalculator.test_version_number_check TestAbacusCalculator.test_property_keywords_reject_conflicting_user_parameters TestAbacusCalculator.test_property_keywords_reject_conflicting_properties TestAbacusCalculator.test_dipole_property_is_not_implemented -v
  • git diff --check -- interfaces/ASE_interface/abacuslite/core.py interfaces/ASE_interface/abacuslite/io/generalio.py interfaces/ASE_interface/abacuslite/io/legacyio.py interfaces/ASE_interface/abacuslite/io/latestio.py

The local shell did not have abacus or mpirun in PATH, so the full calculator execution test remains covered by upstream CI.

@QuantumMisaka QuantumMisaka requested a review from kirk0830 July 3, 2026 15:16
@kirk0830

kirk0830 commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

noted.
I have had a quick scan on your changes. Once all tests are passed, I will review your PR .

Regards.

Comment thread interfaces/ASE_interface/abacuslite/core.py
@mohanchen mohanchen added Interfaces Interfaces with other packages Refactor Refactor ABACUS codes labels Jul 6, 2026
@mohanchen mohanchen merged commit b389b8f into deepmodeling:develop Jul 6, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Interfaces Interfaces with other packages Refactor Refactor ABACUS codes

Projects

None yet

3 participants