Skip to content

Commit ed48b52

Browse files
committed
Fix: widen the range of support on STRU file of Molden interface
1 parent 7a29e2f commit ed48b52

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/molden/molden.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,8 @@ def moldengen(folder: str, ndigits=3, ngto=7, rel_r=2, fmolden="ABACUS.molden"):
938938
elif stru['coord_type'] == "Direct": # in fractional coordinates
939939
vec = np.array(stru['lat']['vec']) * stru['lat']['const']
940940
coords = np.dot(coords, vec)
941-
elif stru['coord_type'] == "Cartesian_Angstrom":
941+
elif stru['coord_type'].startswith("Cartesian_angstrom"):
942+
# including *_center_xy, *_center_z, *_center_xyz, ... cases
942943
coords *= 0.529177249
943944
else:
944945
raise NotImplementedError(f"Unknown coordinate type {stru['coord_type']}")

0 commit comments

Comments
 (0)