Skip to content

Commit

Permalink
Use backwards compatible methods to extract output parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
edan-bainglass committed Jan 13, 2025
1 parent 4e58415 commit e601e37
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/aiidalab_qe/common/bands_pdos/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ def get_bands_projections_data(
bands_data, projections, bands_width
)
if plot_tag != "total":
if not outputs.band_parameters.get("spin_orbit_calculation"):
band_parameters: dict = outputs.band_parameters.get_dict()
if not band_parameters.get("spin_orbit_calculation"):
bands_projection["projected_bands"] = _update_pdos_labels(
bands_projection["projected_bands"]
)
Expand Down Expand Up @@ -248,7 +249,8 @@ def get_pdos_data(pdos, group_tag, plot_tag, selected_atoms):

# Updata labels if plot_tag is different than total and SOC is false
if plot_tag != "total":
if not pdos.nscf.output_parameters.get("spin_orbit_calculation"):
output_parameters: dict = pdos.nscf.output_parameters.get_dict()
if not output_parameters.get("spin_orbit_calculation", False):
data_dict = _update_pdos_labels(data_dict)

return json.loads(json.dumps(data_dict))
Expand Down

0 comments on commit e601e37

Please sign in to comment.