diff --git a/src/aiidalab_qe/app/result/components/viewer/structure/model.py b/src/aiidalab_qe/app/result/components/viewer/structure/model.py index e2a4188ed..aebbeb4c2 100644 --- a/src/aiidalab_qe/app/result/components/viewer/structure/model.py +++ b/src/aiidalab_qe/app/result/components/viewer/structure/model.py @@ -33,7 +33,7 @@ def include(self): def is_relaxed(self): if "relax" not in self.properties: return False - parameters = self.inputs.relax.base.pw.parameters.get_dict() + parameters = self.inputs.relax.base_relax.pw.parameters.get_dict() return "relax" in parameters["CONTROL"]["calculation"] def update(self): diff --git a/src/aiidalab_qe/app/submission/model.py b/src/aiidalab_qe/app/submission/model.py index f10c38b9c..f8c7f47e3 100644 --- a/src/aiidalab_qe/app/submission/model.py +++ b/src/aiidalab_qe/app/submission/model.py @@ -229,7 +229,7 @@ def _create_builder(self, parameters) -> ProcessBuilderNamespace: codes = parameters["codes"]["global"]["codes"] if "relax" in builder: - builder.relax.base.pw.metadata.options.resources = { + builder.relax.base_relax.pw.metadata.options.resources = { "num_machines": codes.get("quantumespresso__pw")["nodes"], "num_mpiprocs_per_machine": codes.get("quantumespresso__pw")[ "ntasks_per_node" @@ -239,9 +239,9 @@ def _create_builder(self, parameters) -> ProcessBuilderNamespace: ], } mws = codes.get("quantumespresso__pw")["max_wallclock_seconds"] - builder.relax.base.pw.metadata.options["max_wallclock_seconds"] = mws + builder.relax.base_relax.pw.metadata.options["max_wallclock_seconds"] = mws parallelization = codes["quantumespresso__pw"]["parallelization"] - builder.relax.base.pw.parallelization = orm.Dict(dict=parallelization) + builder.relax.base_relax.pw.parallelization = orm.Dict(dict=parallelization) return builder diff --git a/src/aiidalab_qe/workflows/__init__.py b/src/aiidalab_qe/workflows/__init__.py index b2220e9ac..0dc130d95 100644 --- a/src/aiidalab_qe/workflows/__init__.py +++ b/src/aiidalab_qe/workflows/__init__.py @@ -201,7 +201,7 @@ def get_builder_from_protocol( overrides=relax_overrides, **kwargs, ) - enable_pencil_decomposition(relax_builder.base.pw) + enable_pencil_decomposition(relax_builder.base_relax.pw) # pop the inputs that are excluded from the expose_inputs relax_builder.pop("structure", None) relax_builder.pop("clean_workdir", None) diff --git a/tests/test_submit_qe_workchain.py b/tests/test_submit_qe_workchain.py index 26592b0ab..4cc86c47b 100644 --- a/tests/test_submit_qe_workchain.py +++ b/tests/test_submit_qe_workchain.py @@ -102,11 +102,11 @@ def test_create_builder_advanced_settings( # check if the AiiDA nodes are passed to the plugins instead of copied, take psuedos as an example assert ( - builder.relax.base.pw.pseudos["Si"].uuid + builder.relax.base_relax.pw.pseudos["Si"].uuid == builder.bands.bands.scf.pw.pseudos["Si"].uuid ) assert ( - builder.relax.base.pw.pseudos["Si"].uuid + builder.relax.base_relax.pw.pseudos["Si"].uuid == builder.pdos.scf.pw.pseudos["Si"].uuid ) @@ -115,7 +115,7 @@ def test_create_builder_advanced_settings( # test tot_charge is updated in the three steps for parameters in [ - got["relax"]["base"], + got["relax"]["base_relax"], got["bands"]["bands"]["scf"], got["pdos"]["scf"], got["pdos"]["nscf"],