Skip to content

Commit

Permalink
ommiting 0.0 values for hubbard (aiidalab#1029)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndresOrtegaGuerrero authored Dec 23, 2024
1 parent 219b06e commit 52865b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ def is_condition_met(shell):
or element.is_chalcogen
or element.symbol in ["C", "N", "P"]: "p",
element.is_alkaline or element.is_alkali or element.is_noble_gas: "s",
element.symbol in ["H", "He"]: "s",
}

condition = next(
Expand Down
6 changes: 5 additions & 1 deletion src/aiidalab_qe/app/configuration/advanced/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,11 @@ def get_model_state(self):

hubbard: HubbardConfigurationSettingsModel = self.get_model("hubbard") # type: ignore
if hubbard.is_active:
parameters["hubbard_parameters"] = {"hubbard_u": hubbard.parameters}
parameters["hubbard_parameters"] = {
"hubbard_u": {
label: value for label, value in hubbard.parameters.items() if value
}
}
if hubbard.has_eigenvalues:
parameters["pw"]["parameters"]["SYSTEM"] |= {
"starting_ns_eigenvalue": hubbard.get_active_eigenvalues()
Expand Down

0 comments on commit 52865b6

Please sign in to comment.