API: Fix compatibility with ASE 3.27.0#301
Merged
jameskermode merged 10 commits intomasterfrom Jan 6, 2026
Merged
Conversation
ASE 3.27.0 moved CellFilter classes (ExpCellFilter, UnitCellFilter, StrainFilter) from ase.constraints to ase.filters. Additionally, ExpCellFilter is deprecated in favor of FrechetCellFilter. Changes: - Update minimum ASE requirement from 3.26.0 to 3.27.0 - Update all imports from ase.constraints to ase.filters for filter classes - Replace ExpCellFilter with FrechetCellFilter (ASE recommended) - FixAtoms constraint remains in ase.constraints (unchanged) Closes #299 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
ASE 3.27.0 only supports Python 3.10+, so we need to drop Python 3.9 support as well. Changes: - Update requires-python from >=3.9.0 to >=3.10.0 - Simplify build-system numpy requirement - Remove Python 3.9 from test matrix - Remove Python 3.9 (cp39) from wheel builds 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
ASE 3.27 consolidated MEP modules, moving NEB from ase.neb to ase.mep. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Test against ASE's GitLab master branch to catch breaking changes early. The dev test runs on Python 3.12, group 1 only, with continue-on-error so failures are visible but don't block PRs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Update remaining usages of ase.constraints.StrainFilter and ase.constraints.UnitCellFilter to use ase.filters instead: - tests/test_bulk_properties.py - tests/test_bop.py - docs/applications/quasi_static_crack.ipynb 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
ASE 3.27 changed the integrator.logfile from a file handle to a Log object that doesn't have a close() method. Remove the unnecessary close() calls. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
…lter FrechetCellFilter (the ASE 3.27 recommended replacement for ExpCellFilter) converges to slightly different minima, causing platform-specific numerical differences. Loosen tolerance from 1e-4 to 5e-4 to accommodate this. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
numpy 2.4 no longer allows int(array) for single-element arrays. Extract scalar values explicitly using array indexing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
The test compares analytical Birch coefficients with numerical finite difference calculations. Loosen tolerance to accommodate platform-specific numerical differences with numpy 2.4. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Expand ASE dev testing to cover the full test suite (all 4 groups) while keeping it restricted to Python 3.12. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
pastewka
approved these changes
Jan 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ase.constraintstoase.filtersExpCellFilterwithFrechetCellFilter(ASE recommended replacement)ase.nebtoase.mepChanges
ASE Filter Migration
ase>=3.26.0toase>=3.27.0gamma_surface.py,dislocation.py,fitting.pymake_crack_thin_strip.py,neb_crack_tip.pydisloc_mobility.ipynbPython Version
requires-pythonfrom>=3.9.0to>=3.10.0.github/workflows/tests.yml).github/workflows/wheels.yml)CI Improvements
continue-on-error: true)Migration Details
from ase.constraints import StrainFilterfrom ase.filters import StrainFilterfrom ase.constraints import UnitCellFilterfrom ase.filters import UnitCellFilterfrom ase.constraints import ExpCellFilterfrom ase.filters import FrechetCellFilterfrom ase.neb import NEBfrom ase.mep import NEBNote:
FixAtomsremains inase.constraints(not affected).Test plan
test_surface_reconstruction.py- passesCloses #299
🤖 Generated with Claude Code