From 289dbf035e6ee3b9a4f0f416f42a8f6f7703bb62 Mon Sep 17 00:00:00 2001 From: Sam Waseda Date: Fri, 11 Feb 2022 18:08:44 +0100 Subject: [PATCH 1/3] add HasGroups --- pyiron_atomistics/sphinx/base.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pyiron_atomistics/sphinx/base.py b/pyiron_atomistics/sphinx/base.py index 3953a019a..4015564e6 100644 --- a/pyiron_atomistics/sphinx/base.py +++ b/pyiron_atomistics/sphinx/base.py @@ -30,6 +30,7 @@ ) from pyiron_atomistics.sphinx.volumetric_data import SphinxVolumetricData from pyiron_base import state, DataContainer, job_status_successful_lst, deprecate +from pyiron_base.interfaces.has_groups import HasGroups __author__ = "Osamu Waseda, Jan Janssen" __copyright__ = ( From f981fd65dc03a0b2704ec61f676f265f29d072e3 Mon Sep 17 00:00:00 2001 From: Sam Waseda Date: Tue, 15 Feb 2022 16:34:09 +0100 Subject: [PATCH 2/3] append some unrelated small changes XD --- pyiron_atomistics/sphinx/base.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pyiron_atomistics/sphinx/base.py b/pyiron_atomistics/sphinx/base.py index 4015564e6..50f0bd9c2 100644 --- a/pyiron_atomistics/sphinx/base.py +++ b/pyiron_atomistics/sphinx/base.py @@ -2031,7 +2031,7 @@ def _rec_cell(self): return ( np.array([ll.split()[1:4] for ll in log_extract]).astype(float) / BOHR_TO_ANGSTROM - ) + )[:3] def get_kpoints_cartesian(self): return np.einsum("ni,ij->nj", self.k_points, self._rec_cell) @@ -2279,7 +2279,9 @@ def collect_energy_struct(self, file_name="energy-structOpt.dat", cwd=None): """ file_name = posixpath.join(cwd, file_name) if os.path.isfile(file_name): - self.generic.dft.energy_free = np.loadtxt(file_name)[:, 1] * HARTREE_TO_EV + self.generic.dft.energy_free = np.loadtxt( + file_name + ).reshape(-1, 2)[:, 1] * HARTREE_TO_EV def collect_sphinx_log( self, file_name="sphinx.log", cwd=None, check_consistency=True From f7e3563dff4a84711f7eb0b19c945b6cab4455ac Mon Sep 17 00:00:00 2001 From: pyiron-runner Date: Tue, 15 Feb 2022 19:27:21 +0000 Subject: [PATCH 3/3] Format black --- pyiron_atomistics/sphinx/base.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyiron_atomistics/sphinx/base.py b/pyiron_atomistics/sphinx/base.py index 50f0bd9c2..879e41d5d 100644 --- a/pyiron_atomistics/sphinx/base.py +++ b/pyiron_atomistics/sphinx/base.py @@ -2279,9 +2279,9 @@ def collect_energy_struct(self, file_name="energy-structOpt.dat", cwd=None): """ file_name = posixpath.join(cwd, file_name) if os.path.isfile(file_name): - self.generic.dft.energy_free = np.loadtxt( - file_name - ).reshape(-1, 2)[:, 1] * HARTREE_TO_EV + self.generic.dft.energy_free = ( + np.loadtxt(file_name).reshape(-1, 2)[:, 1] * HARTREE_TO_EV + ) def collect_sphinx_log( self, file_name="sphinx.log", cwd=None, check_consistency=True