From 496383828519d91acc7b793ea69fbe4aabbd9008 Mon Sep 17 00:00:00 2001 From: skatnagallu Date: Fri, 12 Apr 2024 11:42:21 +0200 Subject: [PATCH 1/5] changed the generic cells property --- pyiron_atomistics/sphinx/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyiron_atomistics/sphinx/base.py b/pyiron_atomistics/sphinx/base.py index 9c98cd7b0..47520f2be 100644 --- a/pyiron_atomistics/sphinx/base.py +++ b/pyiron_atomistics/sphinx/base.py @@ -2147,7 +2147,7 @@ def get_last(arr): if "positions" not in self.generic.list_nodes(): self.generic.positions = np.array([self._job.structure.positions]) if "cells" not in self.generic.list_nodes(): - self.generic.cells = np.array([self._job.structure.cell.tolist()]) + self.generic.cells = np.tile(np.array([self._job.structure.cell.tolist()]),(len(self.generic.energy_tot),1,1)) self.generic.to_hdf(hdf=hdf) with hdf.open("output") as hdf5_output: From 00feb987a50831340cc36d976897f78534306cd5 Mon Sep 17 00:00:00 2001 From: skatnagallu Date: Fri, 12 Apr 2024 11:53:56 +0200 Subject: [PATCH 2/5] get length from generic.dft.energy_free --- pyiron_atomistics/sphinx/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyiron_atomistics/sphinx/base.py b/pyiron_atomistics/sphinx/base.py index 47520f2be..2d1048f1d 100644 --- a/pyiron_atomistics/sphinx/base.py +++ b/pyiron_atomistics/sphinx/base.py @@ -2147,7 +2147,8 @@ def get_last(arr): if "positions" not in self.generic.list_nodes(): self.generic.positions = np.array([self._job.structure.positions]) if "cells" not in self.generic.list_nodes(): - self.generic.cells = np.tile(np.array([self._job.structure.cell.tolist()]),(len(self.generic.energy_tot),1,1)) + self.generic.cells = np.tile(np.array([self._job.structure.cell.tolist()]), + (len(self.generic.dft.energy_free),1,1)) self.generic.to_hdf(hdf=hdf) with hdf.open("output") as hdf5_output: From e518927be9fdab6cbce592e594478462e4e3bdb9 Mon Sep 17 00:00:00 2001 From: Shyam <85609781+skatnagallu@users.noreply.github.com> Date: Wed, 17 Apr 2024 09:43:58 +0200 Subject: [PATCH 3/5] Update pyiron_atomistics/sphinx/base.py using self.generic.cell Co-authored-by: Sam Dareska <37879103+samwaseda@users.noreply.github.com> --- pyiron_atomistics/sphinx/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyiron_atomistics/sphinx/base.py b/pyiron_atomistics/sphinx/base.py index 2d1048f1d..e0206d344 100644 --- a/pyiron_atomistics/sphinx/base.py +++ b/pyiron_atomistics/sphinx/base.py @@ -2146,7 +2146,8 @@ def get_last(arr): self.generic.energy_pot = self.generic.dft.energy_free if "positions" not in self.generic.list_nodes(): self.generic.positions = np.array([self._job.structure.positions]) - if "cells" not in self.generic.list_nodes(): + if "cells" not in self.generic.list_nodes() and "cell" in self.generic.list_nodes(): + self.generic.cells = self.generic.cell self.generic.cells = np.tile(np.array([self._job.structure.cell.tolist()]), (len(self.generic.dft.energy_free),1,1)) self.generic.to_hdf(hdf=hdf) From fdad2f4c272c04c7265765bb569e5144353cbb39 Mon Sep 17 00:00:00 2001 From: Shyam <85609781+skatnagallu@users.noreply.github.com> Date: Wed, 17 Apr 2024 09:55:27 +0200 Subject: [PATCH 4/5] Update pyiron_atomistics/sphinx/base.py Co-authored-by: Sam Dareska <37879103+samwaseda@users.noreply.github.com> --- pyiron_atomistics/sphinx/base.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/pyiron_atomistics/sphinx/base.py b/pyiron_atomistics/sphinx/base.py index e0206d344..a7e4aae17 100644 --- a/pyiron_atomistics/sphinx/base.py +++ b/pyiron_atomistics/sphinx/base.py @@ -2148,8 +2148,6 @@ def get_last(arr): self.generic.positions = np.array([self._job.structure.positions]) if "cells" not in self.generic.list_nodes() and "cell" in self.generic.list_nodes(): self.generic.cells = self.generic.cell - self.generic.cells = np.tile(np.array([self._job.structure.cell.tolist()]), - (len(self.generic.dft.energy_free),1,1)) self.generic.to_hdf(hdf=hdf) with hdf.open("output") as hdf5_output: From 6a207968a287406d99fb4be64a6cfa737141d894 Mon Sep 17 00:00:00 2001 From: pyiron-runner Date: Wed, 17 Apr 2024 10:07:31 +0000 Subject: [PATCH 5/5] Format black --- pyiron_atomistics/sphinx/base.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyiron_atomistics/sphinx/base.py b/pyiron_atomistics/sphinx/base.py index a7e4aae17..cb64ee4c5 100644 --- a/pyiron_atomistics/sphinx/base.py +++ b/pyiron_atomistics/sphinx/base.py @@ -2146,7 +2146,10 @@ def get_last(arr): self.generic.energy_pot = self.generic.dft.energy_free if "positions" not in self.generic.list_nodes(): self.generic.positions = np.array([self._job.structure.positions]) - if "cells" not in self.generic.list_nodes() and "cell" in self.generic.list_nodes(): + if ( + "cells" not in self.generic.list_nodes() + and "cell" in self.generic.list_nodes() + ): self.generic.cells = self.generic.cell self.generic.to_hdf(hdf=hdf)