Skip to content

v0.14.0

Choose a tag to compare

@bjmorgan bjmorgan released this 11 Mar 12:07
· 22 commits to main since this release
85df279

What's new

  • Breaking: Frame now carries a lattice field (shape (3, 3) or None). The lattice field on StructureScene has been replaced by a read-only property that delegates to frames[0].lattice. Code that constructed a StructureScene with lattice=... should move the lattice onto each Frame instead. This correctly supports NPT (variable-cell) trajectories where the unit cell changes between frames. Rendering functions now resolve the lattice from the current frame, so cell edges, periodic bonds, and axes widgets update per frame.

  • New from_ase() constructor and StructureScene.from_ase() classmethod for building scenes directly from ASE Atoms objects, without requiring pymatgen. Supports both periodic and non-periodic systems, single structures and trajectories (list[Atoms] or ase.io.Trajectory), and the same style, bond, polyhedra, and view options as from_pymatgen. ASE is available as an optional dependency: pip install "hofmann[ase]". from_ase() stores the lattice per frame, correctly supporting NPT trajectories where the cell changes between frames.

Install

pip install hofmann==0.14.0