From 7bb67aecd4c93399d67b4bc933a075a5ac2915ff Mon Sep 17 00:00:00 2001 From: Andres Ortega-Guerrero <34098967+AndresOrtegaGuerrero@users.noreply.github.com> Date: Tue, 3 Dec 2024 12:04:42 +0100 Subject: [PATCH] upgrade qe-plugin , include nbands_factor to PdosWorkChain (#965) * 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 --- setup.cfg | 2 +- src/aiidalab_qe/plugins/pdos/workchain.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 2154ec0e4..cab708a5a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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 diff --git a/src/aiidalab_qe/plugins/pdos/workchain.py b/src/aiidalab_qe/plugins/pdos/workchain.py index 1c6a3e845..2be822cd6 100644 --- a/src/aiidalab_qe/plugins/pdos/workchain.py +++ b/src/aiidalab_qe/plugins/pdos/workchain.py @@ -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): @@ -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)