v0.14.0
What's new
-
Breaking:
Framenow carries alatticefield (shape(3, 3)orNone). Thelatticefield onStructureScenehas been replaced by a read-only property that delegates toframes[0].lattice. Code that constructed aStructureScenewithlattice=...should move the lattice onto eachFrameinstead. 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 andStructureScene.from_ase()classmethod for building scenes directly from ASEAtomsobjects, without requiring pymatgen. Supports both periodic and non-periodic systems, single structures and trajectories (list[Atoms]orase.io.Trajectory), and the same style, bond, polyhedra, and view options asfrom_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