Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/pyiron_lammps/compatibility/calculate.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,9 +403,11 @@ def _pressure_to_lammps(pressure, rotation_matrix, units="metal"):

# If necessary, rotate the pressure tensor to the Lammps coordinate frame.
# Isotropic, hydrostatic pressures are rotation invariant.
if not np.isclose(
np.matrix.trace(rotation_matrix), 3
) and not _is_isotropic_hydrostatic(pressure):
if (
rotation_matrix is not None
and not np.isclose(np.matrix.trace(rotation_matrix), 3)
and not _is_isotropic_hydrostatic(pressure)
):
if any(p is None for p in pressure):
raise ValueError(
"Cells which are not orthorhombic or an upper-triangular cell are incompatible with Lammps "
Expand Down
Loading