From 235f860e0dcf96805eb9d44b557e5eda3fd48752 Mon Sep 17 00:00:00 2001 From: "Adam J. Jackson" Date: Tue, 28 May 2024 21:26:55 +0100 Subject: [PATCH] Fix get_spacegroup call to spglib spglib no longer takes ASE Atoms as input, use generic "cell" tuple --- mctools/generic/get_spacegroup.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mctools/generic/get_spacegroup.py b/mctools/generic/get_spacegroup.py index 4c707f5..95fbfe3 100755 --- a/mctools/generic/get_spacegroup.py +++ b/mctools/generic/get_spacegroup.py @@ -23,12 +23,14 @@ def get_spacegroup(filename=False, format=False): else: atoms = ase.io.read(filename) + cell = (atoms.cell.array, atoms.get_scaled_positions(), atoms.numbers) + print("| Threshold / Å | Space group |") print("|---------------|-------------------|") for threshold in (1e-5, 1e-4, 5e-4, 1e-3, 5e-3, 1e-2, 5e-2, 1e-1): print("| {0:0.5f} | {1: <16} |".format( - threshold, spglib.get_spacegroup(atoms, symprec=threshold))) + threshold, spglib.get_spacegroup(cell, symprec=threshold))) def main():