Skip to content

Commit

Permalink
set condition for update label if SOC if False (#940)
Browse files Browse the repository at this point in the history
* set condition for update label if SOC if False
  • Loading branch information
AndresOrtegaGuerrero authored Nov 27, 2024
1 parent 2fd8c91 commit ae520ea
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/aiidalab_qe/common/bands_pdos/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ def get_bands_projections_data(
bands_data, projections, bands_width
)
if plot_tag != "total":
bands_data["projected_bands"] = _update_pdos_labels(
bands_data["projected_bands"]
)
if not outputs.band_parameters.get("spin_orbit_calculation"):
bands_data["projected_bands"] = _update_pdos_labels(
bands_data["projected_bands"]
)
return bands_data


Expand Down Expand Up @@ -151,7 +152,8 @@ def get_pdos_data(pdos, group_tag, plot_tag, selected_atoms):

# Updata labels if plot_tag is different than total
if plot_tag != "total":
data_dict = _update_pdos_labels(data_dict)
if not pdos.nscf.output_parameters.get("spin_orbit_calculation"):
data_dict = _update_pdos_labels(data_dict)
# data_dict = deepcopy(new_dict)

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

0 comments on commit ae520ea

Please sign in to comment.