diff --git a/src/aiidalab_qe/plugins/pdos/model.py b/src/aiidalab_qe/plugins/pdos/model.py
index 6d0d5188d..9751aeef2 100644
--- a/src/aiidalab_qe/plugins/pdos/model.py
+++ b/src/aiidalab_qe/plugins/pdos/model.py
@@ -21,6 +21,7 @@ class PdosConfigurationSettingsModel(ConfigurationSettingsModel, HasInputStructu
mesh_grid = tl.Unicode("")
use_pdos_degauss = tl.Bool(False)
pdos_degauss = tl.Float(0.005)
+ energy_grid_step = tl.Float(0.01)
def update(self, specific=""):
with self.hold_trait_notifications():
@@ -35,6 +36,7 @@ def get_model_state(self):
"nscf_kpoints_distance": self.kpoints_distance,
"use_pdos_degauss": self.use_pdos_degauss,
"pdos_degauss": self.pdos_degauss,
+ "energy_grid_step": self.energy_grid_step,
}
def set_model_state(self, parameters: dict):
@@ -44,12 +46,14 @@ def set_model_state(self, parameters: dict):
)
self.use_pdos_degauss = parameters.get("use_pdos_degauss", False)
self.pdos_degauss = parameters.get("pdos_degauss", 0.005)
+ self.energy_grid_step = parameters.get("energy_grid_step", 0.01)
def reset(self):
with self.hold_trait_notifications():
self.kpoints_distance = self._get_default("kpoints_distance")
self.use_pdos_degauss = self._get_default("use_pdos_degauss")
self.pdos_degauss = self._get_default("pdos_degauss")
+ self.energy_grid_step = self._get_default("energy_grid_step")
def _get_default(self, trait):
return self._defaults.get(trait, self.traits()[trait].default_value)
diff --git a/src/aiidalab_qe/plugins/pdos/setting.py b/src/aiidalab_qe/plugins/pdos/setting.py
index 1c354fd63..462f3aa66 100644
--- a/src/aiidalab_qe/plugins/pdos/setting.py
+++ b/src/aiidalab_qe/plugins/pdos/setting.py
@@ -95,6 +95,17 @@ def render(self):
lambda degauss: f"({degauss * RYDBERG_TO_EV:.4f} eV)",
)
+ self.energy_grid_step = ipw.BoundedFloatText(
+ min=0.001,
+ step=0.001,
+ description="Energy grid step (eV):",
+ style={"description_width": "initial"},
+ )
+ ipw.link(
+ (self._model, "energy_grid_step"),
+ (self.energy_grid_step, "value"),
+ )
+
self.children = [
ipw.HTML("""
@@ -103,12 +114,15 @@ def render(self):
"""),
ipw.HTML("""
- By default, the tetrahedron method is used for PDOS calculation.
- If required you can apply Gaussian broadening with a custom degauss
- value.
+ By default, the tetrahedron method is used for partial density of states (PDOS) calculation.
+ However, if you need more control over the broadening, you can apply Gaussian broadening
+ by specifying a custom degauss value.
+
+ Recommendation for Molecules and Localized Orbitals:
- For molecules and systems with localized orbitals, it is
- recommended to use a custom degauss value.
+ For systems involving molecules or localized orbitals, it is recommended to use a
+ custom degauss value. This will provide a more accurate representation of the PDOS,
+ especially when the electronic states are localized.
"""),
ipw.HBox(
@@ -117,6 +131,7 @@ def render(self):
self.mesh_grid,
]
),
+ self.energy_grid_step,
self.use_pdos_degauss,
ipw.HBox(
children=[
diff --git a/src/aiidalab_qe/plugins/pdos/workchain.py b/src/aiidalab_qe/plugins/pdos/workchain.py
index 6fe19ce2f..1c6a3e845 100644
--- a/src/aiidalab_qe/plugins/pdos/workchain.py
+++ b/src/aiidalab_qe/plugins/pdos/workchain.py
@@ -53,8 +53,20 @@ def get_builder(codes, structure, parameters, **kwargs):
nscf_overrides = deepcopy(parameters["advanced"])
# Dos Projwfc overrides
- dos_overrides = {"parameters": {"DOS": {}}}
- projwfc_overrides = {"parameters": {"PROJWFC": {}}}
+ dos_overrides = {
+ "parameters": {
+ "DOS": {
+ "DeltaE": parameters["pdos"]["energy_grid_step"],
+ }
+ }
+ }
+ projwfc_overrides = {
+ "parameters": {
+ "PROJWFC": {
+ "DeltaE": parameters["pdos"]["energy_grid_step"],
+ }
+ }
+ }
if parameters["pdos"]["use_pdos_degauss"]:
dos_overrides["parameters"]["DOS"] = {
diff --git a/tests/test_submit_qe_workchain/test_create_builder_default.yml b/tests/test_submit_qe_workchain/test_create_builder_default.yml
index 2d6f756e3..9652a7e6d 100644
--- a/tests/test_submit_qe_workchain/test_create_builder_default.yml
+++ b/tests/test_submit_qe_workchain/test_create_builder_default.yml
@@ -89,6 +89,7 @@ codes:
parallelization: {}
override: false
pdos:
+ energy_grid_step: 0.01
nscf_kpoints_distance: 0.1
pdos_degauss: 0.005
use_pdos_degauss: false