From e73cbd41f4ba3f047436fbd516f70272d4bee0f2 Mon Sep 17 00:00:00 2001 From: Yezhi Jin Date: Wed, 6 Mar 2024 17:12:54 -0600 Subject: [PATCH 1/2] fix incorrect ordering of the ase cell --- pysages/backends/ase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pysages/backends/ase.py b/pysages/backends/ase.py index 15e8bab2..6b599f19 100644 --- a/pysages/backends/ase.py +++ b/pysages/backends/ase.py @@ -111,7 +111,7 @@ def take_snapshot(simulation, forces=None): a = atoms.cell[0] b = atoms.cell[1] c = atoms.cell[2] - H = ((a[0], b[0], c[0]), (a[1], b[1], c[1]), (a[2], b[2], c[2])) + H = ((a[0], a[1], a[2]), (b[0], b[1], b[2]), (c[0], c[1], c[2])) origin = (0.0, 0.0, 0.0) dt = simulation.dt From 3172024631eda64056854866cf86097bca21f3ba Mon Sep 17 00:00:00 2001 From: Pablo Zubieta <8410335+pabloferz@users.noreply.github.com> Date: Tue, 19 Mar 2024 19:50:05 -0500 Subject: [PATCH 2/2] Simplify --- pysages/backends/ase.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pysages/backends/ase.py b/pysages/backends/ase.py index 6b599f19..84a845f2 100644 --- a/pysages/backends/ase.py +++ b/pysages/backends/ase.py @@ -108,10 +108,7 @@ def take_snapshot(simulation, forces=None): masses = np.asarray(atoms.get_masses()).reshape(-1, 1) vel_mass = (momenta, masses) - a = atoms.cell[0] - b = atoms.cell[1] - c = atoms.cell[2] - H = ((a[0], a[1], a[2]), (b[0], b[1], b[2]), (c[0], c[1], c[2])) + H = (*atoms.cell,) origin = (0.0, 0.0, 0.0) dt = simulation.dt