Skip to content

Releases: libAtoms/extxyz

v0.3.1

30 Apr 14:36

Choose a tag to compare

extxyz 0.3.1

ase-extxyz-v0.1.1

30 Apr 15:36

Choose a tag to compare

ase-extxyz 0.1.1

extxyz 0.3.0

29 Apr 17:33
3feb058

Choose a tag to compare

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

29 Apr 17:46
3feb058

Choose a tag to compare

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

28 Apr 22:20

Choose a tag to compare

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/Makefile retired. The standalone C library, the cextxyz C test driver, and the optional fextxyz Fortran demo are now Meson targets:
    meson setup builddir
    meson compile -C builddir extxyz cextxyz
    meson install -C builddir
    The Fortran demo opts in via -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-release and pypa/gh-action-pypi-publish once each. The previous design ran them in every matrix job; pypa/gh-action-pypi-publish is 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_property in extxyz.extxyz — silences ASE's FutureWarning on import. Identity-stable cache preserved.
  • tests/run_tests.py: np.string_np.bytes_ (removed in NumPy 2.0) and np.boolnp.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

28 Apr 21:16

Choose a tag to compare

Maintenance release on top of 0.2.0.

Fixes

  • Silence FutureWarnings on import: 5 @lazyproperty decorators replaced with @functools.cached_property. ASE's lazyproperty was 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) and np.boolnp.bool_ (removed in NumPy 1.20). The script aborted with AttributeError on any current numpy.
  • CI/PyPI deploy: switched from manual pip3 install twine to pypa/gh-action-pypi-publish. The previous step tripped PEP 668 ("externally-managed-environment") on macos-latest runners, leaving 7 of 16 macOS wheels off PyPI for 0.2.0. The action ships its own isolated Python and uses skip-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

28 Apr 20:21
0a3feb7

Choose a tag to compare

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.exclude filter and a _extxyz.def exports 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_stress now falls back to ase.stress (ASE 3.28+ relocated the helper) — also addresses #25
  • iread() accepts any pathlib.Path, not just PosixPath (fixes Windows tmp paths)
  • Windows: stdio (fopen/fclose/ftell/fseek) routed through _extxyz to 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.inc workflow path is gone)
  • Retired runners replaced (ubuntu-20.04ubuntu-latest, macos-12macos-latest, windows-2019windows-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-output replaced with $GITHUB_OUTPUT

Installation

pip install extxyz

Full changelog

See merged PRs: #17 (Meson migration), #27 (Python matrix + Windows + QUIP/Meson + ASE compat).

🤖 Release notes assembled with Claude Code

v0.1.3

20 Sep 19:31

Choose a tag to compare

Merge branch 'master' of https://github.com/libAtoms/extxyz

v0.1.3.rc3

06 Mar 17:29
50996d9

Choose a tag to compare

v0.1.3.rc3 Pre-release
Pre-release
Update build-wheels.yml

v0.1.3.rc2

06 Mar 16:03
269ba6b

Choose a tag to compare

v0.1.3.rc2 Pre-release
Pre-release
Update build-wheels.yml