From d5e62760033e1a4596e6a947493f8ef932f85d46 Mon Sep 17 00:00:00 2001 From: Min-Hsueh Chiu Date: Fri, 6 Mar 2026 12:18:30 -0800 Subject: [PATCH] remove additional condition on update button for consistent vis --- crystal_toolkit/components/phonon.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/crystal_toolkit/components/phonon.py b/crystal_toolkit/components/phonon.py index 1ec4e9d0..f164da56 100644 --- a/crystal_toolkit/components/phonon.py +++ b/crystal_toolkit/components/phonon.py @@ -1100,14 +1100,13 @@ def update_crystal_animation( num_sites = struct.num_sites # update structure if the controls got triggered - if sueprcell_update: - total_repeat_cell_cnt = scale_x * scale_y * scale_z + total_repeat_cell_cnt = scale_x * scale_y * scale_z - # create supercell - trans = SupercellTransformation( - ((scale_x, 0, 0), (0, scale_y, 0), (0, 0, scale_z)) - ) - struct = trans.apply_transformation(struct) + # create supercell + trans = SupercellTransformation( + ((scale_x, 0, 0), (0, scale_y, 0), (0, 0, scale_z)) + ) + struct = trans.apply_transformation(struct) struc_graph = StructureGraph.from_local_env_strategy(struct, CrystalNN())