You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
edges A D-dimensional vector or a D × D matrix, depending on the geometry of the box, of Float or Integer type. If edges is a vector, it specifies the space diagonal of a cuboid-shaped box. If edges is a matrix, the box is of triclinic shape with the edge vectors given by the rows of the matrix.
The current implementation in coordinates/H5MD.py
however assumes a 3x3 matrix.
When loading a LAMMPS h5md trajectory of a cubic box, edges have shape (3,) and thus core.triclinic_box will return a vector of zeros.
Actual behavior
Box dimensions are None when loading a H5MD trajectory with box edges specified as vector.
* fix#4075
* Fix parsing of box vector in H5MD reader: cuboid boxes are now handled according
to H5MD standard as they can be given as (Lx, Ly, Lz) only
* update CHANGELOG
* add @schlaicha to AUTHORS
* add docstring
* Add unit test as suggested by @edisj
Expected behavior
According to the H5MD format specification:
edges
A D-dimensional vector or a D × D matrix, depending on the geometry of the box, of Float or Integer type. If edges is a vector, it specifies the space diagonal of a cuboid-shaped box. If edges is a matrix, the box is of triclinic shape with the edge vectors given by the rows of the matrix.
The current implementation in coordinates/H5MD.py
however assumes a 3x3 matrix.
When loading a LAMMPS h5md trajectory of a cubic box, edges have shape (3,) and thus
core.triclinic_box
will return a vector of zeros.Actual behavior
Box dimensions are
None
when loading a H5MD trajectory with box edges specified as vector.Code to reproduce the behavior
minimal_example.zip
Current version of MDAnalysis
MDAnalysis 2.4.2 / Python 3.10.6 / Ubuntu 22.04
The text was updated successfully, but these errors were encountered: