Releases: libAtoms/extxyz
v0.3.1
extxyz 0.3.1
ase-extxyz-v0.1.1
ase-extxyz 0.1.1
extxyz 0.3.0
Breaking change. This release splits the package: `extxyz` is now a pure parser/writer with no ASE dependency, and a new sibling package `ase-extxyz` (released separately) wires the C parser into `ase.io` as the `cextxyz` format.
Migration
If you used `from extxyz import read, write, iread, ExtXYZTrajectoryWriter`:
```bash
pip install --upgrade ase-extxyz # pulls in the new extxyz 0.3.x + ase
```
```python
import ase.io
atoms = ase.io.read('file.xyz', format='cextxyz')
ase.io.write('out.xyz', atoms, format='cextxyz')
Streaming for ASE optimizers / MD:
from ase_extxyz.io import ExtXYZTrajectoryWriter
with ExtXYZTrajectoryWriter('opt.xyz', atoms=atoms) as traj:
opt = LBFGS(atoms)
opt.attach(traj, interval=1)
opt.run(fmax=1e-3)
```
If you only want the C parser (no ASE):
```bash
pip install extxyz
```
```python
import extxyz
for frame in extxyz.iread_dicts('file.xyz'):
print(frame.natoms, frame.cell, list(frame.arrays))
```
What changed
`extxyz` package
- Removed the ASE-aware top-level API. Calling `extxyz.read` / `write` / `iread` / `ExtXYZTrajectoryWriter` raises `ImportError` with a message pointing at `ase-extxyz`.
- Added the dict/array API:
- `extxyz.Frame` — dataclass: `natoms`, `cell`, `pbc`, `info`, `arrays`
- `extxyz.iread_dicts(file, index=None, *, use_cextxyz=True, ...)`
- `extxyz.read_dicts(file, ...)`
- `extxyz.write_dicts(file, frames, ...)`
- `pyproject.toml`: `ase>=3.17` removed from runtime dependencies.
- Internal split: parser AST + `Properties` moved to `extxyz.grammar`; `Frame` + I/O moved to `extxyz.core`.
- `extxyz/utils.py` (ASE glue) deleted; lifted into `ase_extxyz.io`.
- CLI (`python -m extxyz` / `extxyz` script) rewritten to dump JSON via `ExtXYZEncoder` so it works in a no-ASE install.
Tests
- ASE-using tests (`test_kv_parsing_*`, `test_ase_cases`, `test_traj_writer`) moved to the `ase-extxyz` package.
- New `tests/test_core.py` covers the dict API and asserts that `import extxyz` does not pull any `ase.*` module into `sys.modules`.
Installation
```bash
core only (no ASE in the install closure)
pip install extxyz
with ASE plugin
pip install ase-extxyz
```
Full changelog
- #28 — refactor: split into ASE-free extxyz core + ase-extxyz plugin
🤖 Release notes assembled with Claude Code
ase-extxyz 0.1.0
First release of `ase-extxyz`, the ASE I/O plugin backed by the `libextxyz` C parser. Replaces the ASE-aware top-level API retired from `extxyz` in v0.3.0.
Install
```bash
pip install ase-extxyz
```
This pulls in `extxyz>=0.3.0` (with native binary wheels for Linux, macOS, and Windows) and `ase>=3.23.0`.
Use
```python
import ase.io
from ase.build import bulk
atoms = bulk('Cu') * 2
ase.io.write('out.xyz', atoms, format='cextxyz')
back = ase.io.read('out.xyz', format='cextxyz')
```
The plugin registers a format named `cextxyz` (not `extxyz` — that name is taken by ASE's built-in regex-based reader). Pass `format='cextxyz'` explicitly; auto-detection by extension is intentionally disabled to avoid clashing with the built-in.
Streaming for ASE optimizers / MD
```python
from ase.optimize import LBFGS
from ase_extxyz.io import ExtXYZTrajectoryWriter
with ExtXYZTrajectoryWriter('opt.xyz', atoms=atoms) as traj:
opt = LBFGS(atoms)
opt.attach(traj, interval=1)
opt.run(fmax=1e-3)
```
The trajectory writer holds a single libc `FILE*` open across all writes — no per-step file reopen.
What's in the box
- `ase_extxyz.io.cextxyz_format` — `ExternalIOFormat` registered via the `ase.ioformats` entry point.
- `ase_extxyz.io.read_cextxyz` / `write_cextxyz` — generator + writer that ASE invokes when `format='cextxyz'`.
- `ase_extxyz.io.ExtXYZTrajectoryWriter` — streaming writer for optimizer/dynamics attachment.
- Frame ↔ Atoms translation: per-atom name remap (`pos`↔`positions`, `species`↔`symbols`, `velo`↔`momenta` with mass-aware unit conversion), optional `SinglePointCalculator` from comment-line `stress`/`energy`/`forces` keys.
Source
This package lives in the `libAtoms/extxyz` repo under `python/ase-extxyz/`. Issues and PRs go to the same tracker.
🤖 Release notes assembled with Claude Code
extxyz 0.2.2
Maintenance release on top of 0.2.0. (0.2.1 was yanked — only 4 of 16 wheels uploaded due to a CI deploy bug, fixed here.)
Build & packaging
libextxyz/Makefileretired. The standalone C library, thecextxyzC test driver, and the optionalfextxyzFortran demo are now Meson targets:The Fortran demo opts in viameson setup builddir meson compile -C builddir extxyz cextxyz meson install -C builddir
-Dquip_lib_dir=…and-Dquip_mod_dir=….- The standalone shared library is kept out of the Python wheel via
tool.meson-python.wheel.exclude, so the Windows wheel-bundling check no longer trips.
CI
- Wheel-publish refactored to a single Linux job that downloads all wheel artifacts and runs
softprops/action-gh-releaseandpypa/gh-action-pypi-publishonce each. The previous design ran them in every matrix job;pypa/gh-action-pypi-publishis Linux-only and refused to run on macOS/Windows runners — that's what stranded 12 wheels of 0.2.1.
Code quality
@lazyproperty→@functools.cached_propertyinextxyz.extxyz— silences ASE's FutureWarning on import. Identity-stable cache preserved.tests/run_tests.py:np.string_→np.bytes_(removed in NumPy 2.0) andnp.bool→np.bool_(removed in NumPy 1.20).
Docs
README updated to describe the unified Meson build for both the Python wheel and the standalone library + Fortran demo.
Installation
pip install --upgrade extxyz🤖 Release notes assembled with Claude Code
extxyz 0.2.1
Maintenance release on top of 0.2.0.
Fixes
- Silence FutureWarnings on import: 5
@lazypropertydecorators replaced with@functools.cached_property. ASE'slazypropertywas emitting a deprecation notice on every decoration — same semantics, identity-stable cache preserved. - NumPy 2 compatibility for
tests/run_tests.py:np.string_→np.bytes_(removed in NumPy 2.0) andnp.bool→np.bool_(removed in NumPy 1.20). The script aborted withAttributeErroron any current numpy. - CI/PyPI deploy: switched from manual
pip3 install twinetopypa/gh-action-pypi-publish. The previous step tripped PEP 668 ("externally-managed-environment") onmacos-latestrunners, leaving 7 of 16 macOS wheels off PyPI for 0.2.0. The action ships its own isolated Python and usesskip-existing: true, making partial re-uploads idempotent.
No API or behaviour changes. Drop-in replacement for 0.2.0.
Installation
pip install --upgrade extxyz🤖 Release notes assembled with Claude Code
extxyz 0.2.0
Highlights
This release migrates the build system from Makefile to Meson with meson-python, refreshes the supported Python versions, and modernizes the CI matrix.
Build & packaging
- Build system: Makefile → Meson + meson-python (#17)
- Wheels published on PyPI for Linux (manylinux_2_28), macOS arm64, macOS x86_64 (macos-15-intel), and Windows
- Windows wheels enabled via
tool.meson-python.wheel.excludefilter and a_extxyz.defexports file - PCRE2 bundled into Windows wheels via
delvewheel
Python support
- Added: Python 3.13
- Dropped: Python 3.7, 3.8, 3.9 (all upstream EOL)
- Currently supported: 3.10, 3.11, 3.12, 3.13
Compatibility
from ase.constraints import full_3x3_to_voigt_6_stressnow falls back toase.stress(ASE 3.28+ relocated the helper) — also addresses #25iread()accepts anypathlib.Path, not justPosixPath(fixes Windows tmp paths)- Windows: stdio (
fopen/fclose/ftell/fseek) routed through_extxyzto avoid CRT-mismatch crashes between Python's CRT and the extension's CRT
CI / build infrastructure
- QUIP/libAtoms now built via Meson (the legacy
Makefile.incworkflow path is gone) - Retired runners replaced (
ubuntu-20.04→ubuntu-latest,macos-12→macos-latest,windows-2019→windows-latest) - Action versions bumped:
actions/checkout@v2 → @v4,actions/setup-python@v2 → @v5,actions/upload-artifact@v2 → @v4,pypa/cibuildwheel @v2.12.1 → @v2.22.0 - Deprecated
::set-outputreplaced with$GITHUB_OUTPUT
Installation
pip install extxyzFull changelog
See merged PRs: #17 (Meson migration), #27 (Python matrix + Windows + QUIP/Meson + ASE compat).
🤖 Release notes assembled with Claude Code
v0.1.3
Merge branch 'master' of https://github.com/libAtoms/extxyz
v0.1.3.rc3
Update build-wheels.yml
v0.1.3.rc2
Update build-wheels.yml