diff --git a/src/py/mat3ra/made/cell.py b/src/py/mat3ra/made/cell.py index 01dd9558..15bff1a1 100644 --- a/src/py/mat3ra/made/cell.py +++ b/src/py/mat3ra/made/cell.py @@ -51,3 +51,7 @@ def convert_point_to_crystal(self, point: List[float]) -> List[float]: def scale_by_matrix(self, matrix: List[List[float]]): np_vector = np.array(self.vectors_as_array) self.vector1, self.vector2, self.vector3 = np.dot(np.array(matrix), np_vector).tolist() + + @property + def volume(self) -> float: + return np.linalg.det(np.array(self.vectors_as_array))