Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
acf6590
fix(ase): backport bundled calculator and parser corrections
QuantumMisaka Nov 15, 2026
770926e
fix(ase): keep result handoff compatible with ASE
QuantumMisaka Nov 15, 2026
d3eb7bf
refactor(ase): share result schema projection
QuantumMisaka Nov 15, 2026
f24cbb1
style(ase): make schema projection cardinality explicit
QuantumMisaka Nov 15, 2026
2bb94cc
fix(ase): use English diagnostics for SCF matching
QuantumMisaka Nov 15, 2026
8f8c398
refactor(ase): keep only required SCF reference data
QuantumMisaka Nov 15, 2026
2496fb7
style(ase): simplify atom-order validation
QuantumMisaka Nov 15, 2026
0d7a9c3
refactor(ase): defer result shapes to ASE schema
QuantumMisaka Nov 15, 2026
da89f32
refactor(ase): trim backport scope and address reader review
QuantumMisaka Nov 15, 2026
329bdf8
refactor(ase): remove redundant frame and result bookkeeping
QuantumMisaka Nov 15, 2026
2ffe3c7
fix(ase): normalize output geometry at the reader boundary
QuantumMisaka Nov 16, 2026
cc3f2f9
Merge branch 'develop' into fix/ase-upstream-abacuslite
QuantumMisaka Nov 17, 2026
4d24f63
refactor(ase): isolate SCF structure matching
QuantumMisaka Nov 18, 2026
f31344c
fix(ase): match SCF geometry using engine STRU conventions
QuantumMisaka Nov 18, 2026
034d4fb
Merge branch 'develop' into fix/ase-upstream-abacuslite
QuantumMisaka Nov 18, 2026
7d7a6b7
refactor(ase): validate single-point SCF geometry
QuantumMisaka Nov 19, 2026
b1ba5e4
fix(ase): preserve valid SCF and input data
QuantumMisaka Nov 19, 2026
83667f8
refactor(ase): keep only the SCF result count check
QuantumMisaka Nov 19, 2026
80d6f16
Merge branch 'develop' into fix/ase-upstream-abacuslite
kirk0830 Nov 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 40 additions & 1 deletion interfaces/ASE_interface/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ abacuslite is a lightweight plugin for ABACUS (Atomic-orbital Based Ab-initio Co
### Key Features

- **Lightweight Design**: Implemented as a plugin, no need to modify ASE core code
- **Version Compatibility**: Supports ASE versions satisfying the package requirement `ase>=3.22`
- **Version Compatibility**: Requires `ase>=3.23`, because ASE 3.22 lacks `ase.calculators.genericfileio`, which this plugin imports
- **ASE Integration**: Uses ASE as the running platform, making ABACUS a callable calculator within it
- **Function Support**: Provides SCF-based energy, force, and stress evaluations through ASE. ASE can use these evaluations for relaxation, molecular dynamics, NEB, band-structure, and density-of-states workflows.
- **Socket Support**: `AbacusSocketIO` provides fixed-cell i-PI socket calculations, with energy always available and forces/stress enabled independently when requested.
Expand Down Expand Up @@ -39,6 +39,45 @@ Please refer to the example scripts in the `examples` folder. Recommended learni

The regular `Abacus` calculator runs one ABACUS calculation for each ASE property evaluation. ASE controls the relaxation, molecular-dynamics, and other workflow steps. The socket calculator reuses one ABACUS process for position updates, while the cell and electronic-structure settings remain fixed for that calculator instance.

## Result collection

The ASE calculator requires exactly one parsed result for single-point SCF.
Native relaxation and MD use the final parsed frame. The readers restore ASE
atom order using the mapping created when the calculator writes STRU. The
legacy reader can use MD_dump when present, and the develop reader reads
native MD from MD_dump. Each calculator retains its own LTS/develop reader.

Both output readers accept paths or named text streams, using the log filename
to locate companion output files. Caller-owned streams remain open and are read
from their current position; seek to the start before rereading. Returned ASE
positions and cells are Cartesian Angstrom values, with Direct and alat
conversions applied once by the reader. Raw trajectory dictionaries retain
their file-native conventions.

Returned structures represent the simulation box with periodic boundaries in
all directions, including molecules in vacuum and slabs. This changes earlier
SCF output flags; readers do not infer physical isolation from vacuum thickness.
For nonperiodic geometry analysis, make a copy and explicitly set its `pbc`
flags; this does not change the completed calculation's boundary conditions.

Result parsing does **not read abacus.json**. Missing or malformed JSON does not
affect collection. Writing new input leaves existing JSON files untouched.

Both ASE `energy` and `free_energy` retain ABACUS's force-consistent
`E_KohnSham`. When an entropy term is present, `energy_without_entropy` is
provided separately; a missing term remains unknown. Noncollinear vector
moments are retained without modifying ASE's global property definitions.

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.

Non-blocking: the recommended examples/soc.py and tests/magnetic.py still replace ASE’s global magnetic-property definitions. The new handoff no longer needs that workaround; removing it would align these consumers with the documented behavior and avoid rejecting later collinear results in the same process.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Addressed in 770926e: removed the global ASE magnetic-property mutation from examples/soc.py and tests/magnetic.py. The calculator now handles vector moments locally.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The global magnetic-property mutations remain removed from both examples/soc.py and tests/magnetic.py. This consumer correction is retained in the reduced diff; it is not part of the test-directory removal (329bdf8).

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.

Both global magnetic-schema overrides are removed from the SOC example and magnetic integration test, so this consumer cleanup is addressed.

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.

Non-blocking: tests/magnetic.py again overrides ASE's global magmom/magmoms schema at 83667f8f, while the SOC example retains the earlier cleanup. Please remove the test override too so the noncollinear case can catch regressions in the calculator's handling of ASE's standard schema.

Static source review only; no tests or CI results verified.

STRU writing preserves representable species masses and converts ASE
velocities to atomic units. Different masses within one ABACUS species are
rejected because one species entry cannot represent them.

The existing inline tests (`abacuslite/xtest.sh`) and engine integration tests
(`tests/xtest.sh`) are run by the ASE plugin workflow. Standalone offline
regressions and recorded output fixtures are maintained in
[QuantumMisaka/abacuslite](https://github.com/QuantumMisaka/abacuslite).
The calculator and parser corrections were adapted from standalone revisions
`39ab1d5` and `5d3da5d`, with follow-up ASE compatibility fixes.

## Authors

- Yuyang Ji
Expand Down
Loading
Loading