Skip to content

Commit

Permalink
Bug Fixes: fix error type in cell.py get_dv function
Browse files Browse the repository at this point in the history
  • Loading branch information
robinzyb committed Nov 3, 2023
1 parent 9282469 commit 781a208
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cp2kdata/cell.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from ase.geometry.cell import cell_to_cellpar
import numpy.typing as npt
import numpy as np
from numpy.linalg import LinAlgError
from copy import deepcopy

class Cp2kCell:
Expand Down Expand Up @@ -89,7 +90,7 @@ def get_volume(self):
def get_dv(self):
try:
return np.linalg.det(self.grid_spacing_matrix)
except AttributeError as ae:
except LinAlgError as ae:
print("No grid point information is available")

def get_cell_param(self):
Expand Down

0 comments on commit 781a208

Please sign in to comment.