Skip to content

Commit

Permalink
upgrade qe-plugin , include nbands_factor to PdosWorkChain (#965)
Browse files Browse the repository at this point in the history
* upgrade qe-plugin to version 4.7.0 to be able to include nbands_factor to PdosWorkChain
* Use input parameters from PwBandsWorkChain nbands_factor in the PdosWorkChain builder
  • Loading branch information
AndresOrtegaGuerrero authored Dec 3, 2024
1 parent 2463cb5 commit 7bb67ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ packages = find:
install_requires =
aiida-core~=2.2,<3
Jinja2~=3.0
aiida-quantumespresso~=4.6
aiida-quantumespresso~=4.7
aiidalab-widgets-base[optimade]==2.3.0a2
aiida-pseudo~=1.4
filelock~=3.8
Expand Down
6 changes: 6 additions & 0 deletions src/aiidalab_qe/plugins/pdos/workchain.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from aiida import orm
from aiida.plugins import WorkflowFactory
from aiida_quantumespresso.common.types import ElectronicType, SpinType
from aiidalab_qe.plugins.utils import set_component_resources

PdosWorkChain = WorkflowFactory("quantumespresso.pdos")
PwBandsWorkChain = WorkflowFactory("quantumespresso.pw.bands")


def check_codes(pw_code, dos_code, projwfc_code):
Expand Down Expand Up @@ -98,6 +100,10 @@ def get_builder(codes, structure, parameters, **kwargs):
overrides=overrides,
**kwargs,
)
# include nbands_factor (Same as in BandsWorkChain)
pdos["nbands_factor"] = orm.Float(
PwBandsWorkChain.get_protocol_inputs()["nbands_factor"]
)
# pop the inputs that are exclueded from the expose_inputs
pdos.pop("structure", None)
pdos.pop("clean_workdir", None)
Expand Down

0 comments on commit 7bb67ae

Please sign in to comment.