Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
6 changes: 3 additions & 3 deletions src/aiidalab_qe/app/submission/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/aiidalab_qe/workflows/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions tests/test_submit_qe_workchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand All @@ -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"],
Expand Down
Loading