Skip to content

Commit b6edd77

Browse files
ZeroKnightingXixian
and
Xixian
authored
fix: cell dectection for zero lattice length (#53)
* fix: non-pbc handle * fix: zero cell detect * fix bugs * fix: cell detect error when cell is negative * fix bugs --------- Co-authored-by: Xixian <[email protected]>
1 parent eeb275c commit b6edd77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mattersim/datasets/utils/convertor.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def convert(
206206
atoms.set_cell(lattice_matrix)
207207
atoms.set_pbc(pbc_)
208208
else:
209-
if np.all(atoms.cell < 1e-5):
209+
if np.all(abs(atoms.cell) < 1e-5):
210210
raise ValueError("Cell vectors are too small")
211211
else:
212212
raise ValueError("structure type not supported")

0 commit comments

Comments
 (0)