Skip to content

Commit

Permalink
Use .content for Sphinx
Browse files Browse the repository at this point in the history
Because sphinx stores some output in datacontainer that need to be instantiated
  • Loading branch information
pmrv committed Jun 9, 2024
1 parent 7f91818 commit a551838
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyiron_atomistics/sphinx/interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,14 +376,14 @@ def check_band_occupancy(self, plot=True):
import matplotlib.pylab as plt

try:
elec_dict = self._job.project_hdf5["output/generic/dft"]["n_valence"]
elec_dict = self._job.content["output/generic/dft"]["n_valence"]
except ValueError:
raise AssertionError("Number of electrons not parsed") from None
n_elec = np.sum(
[elec_dict[k] for k in self._job.structure.get_chemical_symbols()]
)
n_elec = int(np.ceil(n_elec / 2))
bands = self._job.project_hdf5["output/generic/dft/bands_occ"][-1]
bands = self._job.content["output/generic/dft/bands_occ"][-1]
bands = bands.reshape(-1, bands.shape[-1])
max_occ = np.sum(~np.isclose(bands, 0), axis=-1).max()
n_bands = bands.shape[-1]
Expand Down

0 comments on commit a551838

Please sign in to comment.