Skip to content

Commit 6c1acca

Browse files
authored
Merge pull request #515 from materialsproject/phonon-update
remove additional condition on update button for consistent vis
2 parents 0dfa50b + 43770ba commit 6c1acca

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

crystal_toolkit/components/phonon.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,14 +1100,13 @@ def update_crystal_animation(
11001100
num_sites = struct.num_sites
11011101

11021102
# update structure if the controls got triggered
1103-
if sueprcell_update:
1104-
total_repeat_cell_cnt = scale_x * scale_y * scale_z
1103+
total_repeat_cell_cnt = scale_x * scale_y * scale_z
11051104

1106-
# create supercell
1107-
trans = SupercellTransformation(
1108-
((scale_x, 0, 0), (0, scale_y, 0), (0, 0, scale_z))
1109-
)
1110-
struct = trans.apply_transformation(struct)
1105+
# create supercell
1106+
trans = SupercellTransformation(
1107+
((scale_x, 0, 0), (0, scale_y, 0), (0, 0, scale_z))
1108+
)
1109+
struct = trans.apply_transformation(struct)
11111110

11121111
struc_graph = StructureGraph.from_local_env_strategy(struct, CrystalNN())
11131112

0 commit comments

Comments
 (0)