Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check SPHInX output class #534

Merged
merged 3 commits into from Feb 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions pyiron_atomistics/sphinx/base.py
Expand Up @@ -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__ = (
Expand Down Expand Up @@ -2030,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)
Expand Down Expand Up @@ -2278,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
Expand Down