Skip to content

Commit

Permalink
Fix get_spacegroup call to spglib
Browse files Browse the repository at this point in the history
spglib no longer takes ASE Atoms as input, use generic "cell" tuple
  • Loading branch information
ajjackson committed May 28, 2024
1 parent 450feec commit 235f860
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mctools/generic/get_spacegroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit 235f860

Please sign in to comment.