A lightweight ABACUS calculator and I/O plugin for ASE. It packages ABACUS's
ASE interface as an independent, pip-installable project. Existing
abacuslite imports keep working, and ASE does not need patching.
Use it for energy, forces and stress in ASE workflows, or to read and write ABACUS files without launching an engine. The current develop output format and the 3.10.x LTS format are supported. The fixed-cell socket calculator requires an ABACUS build with the socket driver.
Stable release: 1.2.2 on PyPI.
Version 1.2.2 fixes noncollinear magnetic-result projection without modifying
ASE's global definitions and documents the
public API contract. Existing energy conventions,
including optional no-entropy metadata, are preserved. The release was tested
with ABACUS develop v3.11.0-beta11 and LTS v3.10.1. See the
compatibility record
for the tested snapshots and current checks.
- Lightweight: an ASE plugin; no ASE core changes are required.
- Engine compatibility: each calculator selects
latestioorlegacyiofrom the configured ABACUS version. - ASE workflows: energy, forces and stress for relaxation, MD, NEB, band structure and DOS through ASE.
- Socket support:
AbacusSocketIOprovides fixed-cell i-PI calculations. - Pure I/O: read and write INPUT, STRU and KPT, and read completed output without launching ABACUS.
Requires Python 3.10+ and ASE 3.28+ (<4):
python3 -m venv .venv
source .venv/bin/activate
python -m pip install 'abacuslite==1.2.2'
python -m pip checkPip installs ASE, NumPy and seekpath. ABACUS, pseudopotentials and orbital files are supplied separately. Tested engine snapshots are listed in supported versions.
Read an existing input file without an engine:
from abacuslite.io.generalio import read_input
print(read_input("INPUT"))Run a short SCF calculation:
from ase.build import bulk
from abacuslite import Abacus, AbacusProfile
atoms = bulk("Si", "diamond", a=5.43)
profile = AbacusProfile(
command="mpirun -np 2 abacus", # or the actual ABACUS binary path
pseudo_dir="/path/to/PP_ORB",
orbital_dir="/path/to/PP_ORB",
)
atoms.calc = Abacus(
profile=profile,
directory="scf-run",
pseudopotentials={"Si": "Si_ONCV_PBE-1.0.upf"},
basissets={"Si": "Si_gga_8au_100Ry_2s2p1d.orb"},
inp={"basis_type": "lcao", "gamma_only": True, "scf_thr": 1e-3},
)
print(atoms.get_potential_energy())Recent ABACUS develop builds may name the executable abacus_basic_para
instead of abacus; point command at the actual binary. Most shipped
examples use genelpa; if your build lacks it, set ks_solver to an available
solver.
The source release includes eleven examples. A suggested learning path is SCF, relaxation or MD, then the more specialized workflows. See the usage guide for assets, engine features, cleanup behavior and the complete table.
| Example | Purpose |
|---|---|
| scf.py | SCF calculation of silicon |
| relax.py | Atomic position relaxation |
| cellrelax.py | Cell relaxation |
| bandstructure.py | Band structure |
| dos.py | Density of states |
| md.py | Molecular dynamics |
| constraintmd.py | Constrained molecular dynamics |
| metadynamics.py | Metadynamics with PLUMED |
| neb.py | Nudged elastic band |
| soc.py | Noncollinear spin-orbit coupling |
| socketio.py | Fixed-cell socket calculations |
| Task | Guide |
|---|---|
| Configure calculators, read output, run examples | Usage |
| Check tested engines and limitations | Supported versions |
| Fix common setup and runtime problems | Troubleshooting |
| Migrate ABACUS/ATST callers | Migration |
| Understand modules and package boundaries | Module reference |
| Check CI and acceptance evidence | Compatibility |
| Set up development and run tests | Contributing |
| Review changes and attribution | Changelog, provenance |
- Yuyang Ji (@jiyuyang)
- Zhenxiong Shen (@Shen-Zhen-Xiong)
- Yike Huang (@kirk0830)
- Zhaoqing Liu (@QuantumMisaka)
- Jianrui Geng (@Phorbol) — fixed-cell i-PI
socket driver and
AbacusSocketIO(ABACUS #7609).
Thanks to the ABACUS community for their support and contributions.
Licensed under LGPL-3.0-only. Original attribution and ATST-derived adaptations are recorded in UPSTREAM.md.
Report issues at QuantumMisaka/abacuslite.