diff --git a/chgnet/model/model.py b/chgnet/model/model.py index 8ee1f481..2ef50281 100644 --- a/chgnet/model/model.py +++ b/chgnet/model/model.py @@ -807,7 +807,11 @@ def from_graphs( else: strain = None lattice = graph.lattice - volumes.append(torch.det(lattice)) + volumes.append( + torch.linalg.vecdot( + lattice[0], torch.linalg.cross(lattice[1], lattice[2]) + ) + ) strains.append(strain) # Bonds