From bb9ede4b5e43ef81b7b0fa299bcd4a26789725da Mon Sep 17 00:00:00 2001 From: AndresOrtegaGuerrero Date: Mon, 2 Dec 2024 10:52:32 +0000 Subject: [PATCH 1/2] upgrade qe-plugin , include nbands_factor to PdosWorkChain --- setup.cfg | 2 +- src/aiidalab_qe/plugins/pdos/workchain.py | 3 +++ 2 files changed, 4 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 6fe19ce2f..eafc36fc1 100644 --- a/src/aiidalab_qe/plugins/pdos/workchain.py +++ b/src/aiidalab_qe/plugins/pdos/workchain.py @@ -1,3 +1,4 @@ +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 @@ -86,6 +87,8 @@ def get_builder(codes, structure, parameters, **kwargs): overrides=overrides, **kwargs, ) + # include nbands_factor (Same as in BandsWorkChain) + pdos["nbands_factor"] = orm.Float(3.0) # pop the inputs that are exclueded from the expose_inputs pdos.pop("structure", None) pdos.pop("clean_workdir", None) From 1e0678262967867b346f1153ada5c06a68fd6a79 Mon Sep 17 00:00:00 2001 From: AndresOrtegaGuerrero Date: Tue, 3 Dec 2024 10:55:52 +0000 Subject: [PATCH 2/2] using input parameters from PwBandsWorkChain nbands_factor --- src/aiidalab_qe/plugins/pdos/workchain.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/aiidalab_qe/plugins/pdos/workchain.py b/src/aiidalab_qe/plugins/pdos/workchain.py index eafc36fc1..3c19fc280 100644 --- a/src/aiidalab_qe/plugins/pdos/workchain.py +++ b/src/aiidalab_qe/plugins/pdos/workchain.py @@ -4,6 +4,7 @@ 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): @@ -88,7 +89,9 @@ def get_builder(codes, structure, parameters, **kwargs): **kwargs, ) # include nbands_factor (Same as in BandsWorkChain) - pdos["nbands_factor"] = orm.Float(3.0) + 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)