From 1a93ce876a37fc524e17a22311cf063afc36eca0 Mon Sep 17 00:00:00 2001 From: "Andrew S. Rosen" Date: Thu, 9 May 2024 16:00:14 -0700 Subject: [PATCH] Phonopy cleanup (#2106) --- src/quacc/atoms/phonons.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/quacc/atoms/phonons.py b/src/quacc/atoms/phonons.py index a634badfe1..2f811849a7 100644 --- a/src/quacc/atoms/phonons.py +++ b/src/quacc/atoms/phonons.py @@ -62,19 +62,17 @@ def get_phonopy( """ phonopy_kwargs = phonopy_kwargs or {} - structure = AseAtomsAdaptor().get_structure(atoms) - structure = SpacegroupAnalyzer( - structure, symprec=symprec + symmetrized_structure = SpacegroupAnalyzer( + AseAtomsAdaptor().get_structure(atoms), symprec=symprec ).get_symmetrized_structure() if supercell_matrix is None and min_lengths is not None: supercell_matrix = np.diag( - np.round(np.ceil(min_lengths / atoms.cell.lengths())) + np.round(np.ceil(min_lengths / np.array(symmetrized_structure.lattice.abc))) ) - phonopy_atoms = get_phonopy_structure(structure) phonon = phonopy.Phonopy( - phonopy_atoms, + get_phonopy_structure(symmetrized_structure), symprec=symprec, supercell_matrix=supercell_matrix, **phonopy_kwargs,