Fix negative volume for triclinic cells in read_thermodynamic_data

read_thermodynamic_data computed the triclinic-cell volume via a hand-expanded determinant of the 3x3 cell matrix, but one cross term used the wrong component (cell_xz instead of cell_zx). For nearly-cubic cells with small off-diagonal terms the error was negligible, but for strongly sheared cells it could flip the sign of the computed volume.

Also switches the cell/volume computation from pandas Series arithmetic to plain numpy arrays (.to_numpy()), which is faster for the large row counts typical of long MD runs (benchmarked ~1.5-2x speedup at 100k rows) with no change in output values.

Adds a regression test that checks the computed volume against np.linalg.det for a strongly triclinic cell.

Closes #140 (closed)

Merge request reports

Loading