ABACUS-Forge · 算筹工场
ABACUS-Forge is an agent-first CLI and Python library for ABACUS. It organizes inputs, calculations, and outputs as units that can be handed off independently. Researchers and agents compose operations around the files and facts each step consumes.
What you can do
- Compose steps. Prepare or edit inputs, execute the engine, collect facts, and analyze outputs as separate calls. Agent integrations discover typed operations through
capabilitiesandschema. - Fan out calculations. Dispatch phonon, elastic, selected-atom vibration, or phono3py units from a plan. Each worker receives the inputs for its unit.
- Continue from saved results. Gather results in any order, keep valid records, and retry missing or failed units. Pass the returned records or fitted artifacts to downstream analysis.
Start with the runnable examples below. The architecture explains the operation, unit, and restart boundaries.
Quick Try Without ABACUS (60 Seconds)
Use Python 3.10 or newer. See the installation guide for PyPI, GitHub, and local wheel options. After installing, run this in a fresh directory:
abacus-forge doctor --json
abacus-forge capabilities
python - <<'PY'
from pathlib import Path
from uuid import uuid4
from ase.build import bulk
from abacus_forge import OperationOutcome, ScfExecuteRequest, ScfServiceSet, prepare
root = Path.cwd()
prepare(root / "first-run", structure=bulk("Si", "diamond", a=5.43), task="scf", asset_library="none")
result = ScfServiceSet.default(workspace_root=root).execute.execute(
ScfExecuteRequest(str(uuid4()), "first-run", executable="abacus", dry_run=True)
)
assert isinstance(result, OperationOutcome), result.to_dict()
assert result.envelope.status.execution == "skipped"
print(result.envelope.status.to_dict())
PY
This exercise prepares and inspects input files without an ABACUS binary or PP/ORB. The checkout's getting_started.py also exercises error envelopes. The Engine-Free Quickstart uses real Si assets so the prepared inputs can be reused for SCF.
Run silicon SCF
Run abacus-forge assets install once to install or register the APNS PP/ORB library. Set ABACUS_BIN to your ABACUS executable, then run from a fresh directory:
set -e
: "${ABACUS_BIN:?Set ABACUS_BIN to the engine path}"
test ! -e scf || { echo "Choose a fresh directory; scf already exists" >&2; exit 1; }
python -c 'from ase.build import bulk; from ase.io import write; write("Si.cif", bulk("Si", "diamond", a=5.43))'
abacus-forge prepare scf --structure Si.cif --profile si-apns-lcao --asset-library apns \
--kpoint 4 --kpoint 4 --kpoint 4
abacus-forge execute scf --executable "$ABACUS_BIN" --mpi 1 --omp 1
abacus-forge collect scf --json > result.json
python - <<'PY'
import json, math
r = json.load(open('result.json'))
e = r['metrics'].get('total_energy')
if not (r['status'] == 'completed' and r['metrics'].get('converged') is True
and isinstance(e, (int, float)) and not isinstance(e, bool) and math.isfinite(e)):
raise SystemExit('Incomplete SCF; inspect result.json and the ABACUS running log')
print(f'Total energy: {e} eV')
PY
The si-apns-lcao profile configures PBE, LCAO, 100 Ry, and scf_thr=1e-7. A registered library also acts as the default for plain prepare. Inspect scf/inputs/{INPUT,STRU,KPT} and the copied asset pair before executing, and override a setting with --parameter KEY=VALUE. See Quickstart for Python usage with explicit files and a plane-wave alternative.
Split a phonon calculation across workers
Install the phonon extra using the same source as your base install (see the installation guide). Starting from a prepared SCF workspace, phonon prepare writes a relocatable plan and one self-contained directory per displacement (including its referenced PP/ORB assets). External callers can run execute-unit and collect-unit for any unit_id on any worker, check missing items with gather, and compute force constants and Γ-point frequencies offline via post --results.
See the Split Phonon Walkthrough and the Composite Workflows Guide.
Documentation
- Project direction — Roadmap and Changelog
- Architecture — Workspace, contracts, and split execution (中文)
- Usage — User Guide and Documentation Map
- Development — Contributing and Coding-agent instructions (中文)
Licensed under GPL-3.0.
Metadata
Release files for abacus-forge 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| abacus_forge-0.2.0.tar.gz | 821.5 kB | With provenance | Details for abacus_forge-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| abacus_forge-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for abacus_forge-0.2.0-py3-none-any.whl |
Total release size: 1.2 MB
Release files / abacus_forge-0.2.0.tar.gz
| Download URL | abacus_forge-0.2.0.tar.gz |
|---|---|
| Size | 821.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
18f1f330e186f4b39e3d9d459e63a2143c4ca4c571ee4c32169213798bc298ec
|
|
BLAKE2b-256 checksum How to use checksums |
859e1b293257c0ebf4d596123ca4b9a75d0db67709cc5928b1ba1555480f6a91
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logRelease files / abacus_forge-0.2.0-py3-none-any.whl
| Download URL | abacus_forge-0.2.0-py3-none-any.whl |
|---|---|
| Size | 353.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5d4c0e9d15d951e58ed751017ddfcdb11dc2b4d5ee646cd9b9bb035a94b2b5d0
|
|
BLAKE2b-256 checksum How to use checksums |
b0d4335dba97676891959d20a47ca8751c054cd300552def1e0ce3bcc065030f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logSecurity for abacus-forge 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for abacus_forge-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.