Skip to content

Commit

Permalink
Fix missing max_iterations in overrides
Browse files Browse the repository at this point in the history
Fixes #966

All the base workchains missed to override the `max_iterations`
input. This is now fixed for all of them.
  • Loading branch information
bastonero authored and sphuber committed Nov 23, 2023
1 parent 39287e0 commit 9061ea5
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/aiida_quantumespresso/workflows/protocols/ph/base.yaml
@@ -1,5 +1,6 @@
default_inputs:
clean_workdir: False
max_iterations: 5
ph:
metadata:
options:
Expand Down
1 change: 1 addition & 0 deletions src/aiida_quantumespresso/workflows/protocols/pw/base.yaml
Expand Up @@ -2,6 +2,7 @@ default_inputs:
clean_workdir: False
kpoints_distance: 0.15
kpoints_force_parity: False
max_iterations: 5
meta_parameters:
conv_thr_per_atom: 0.2e-9
etot_conv_thr_per_atom: 1.e-5
Expand Down
Expand Up @@ -2,6 +2,7 @@ default_inputs:
clean_workdir: False
kpoints_distance: 0.15
kpoints_force_parity: False
max_iterations: 5
xspectra:
parameters:
INPUT_XSPECTRA:
Expand Down
1 change: 1 addition & 0 deletions src/aiida_quantumespresso/workflows/pw/base.py
Expand Up @@ -227,6 +227,7 @@ def get_builder_from_protocol(
else:
builder.kpoints_distance = orm.Float(inputs['kpoints_distance'])
builder.kpoints_force_parity = orm.Bool(inputs['kpoints_force_parity'])
builder.max_iterations = orm.Int(inputs['max_iterations'])
# pylint: enable=no-member

return builder
Expand Down
1 change: 1 addition & 0 deletions src/aiida_quantumespresso/workflows/xspectra/base.py
Expand Up @@ -137,6 +137,7 @@ def get_builder_from_protocol(
if 'settings' in inputs['xspectra']:
builder.xspectra['settings'] = orm.Dict(inputs['xspectra']['settings'])
builder.clean_workdir = orm.Bool(inputs['clean_workdir'])
builder.max_iterations = orm.Int(inputs['max_iterations'])
# pylint: enable=no-member

return builder
Expand Down
3 changes: 3 additions & 0 deletions tests/workflows/protocols/pw/test_bands/test_default.yml
@@ -1,4 +1,5 @@
bands:
max_iterations: 5
pw:
code: test.quantumespresso.pw@localhost
metadata:
Expand Down Expand Up @@ -39,6 +40,7 @@ relax:
base:
kpoints_distance: 0.15
kpoints_force_parity: false
max_iterations: 5
pw:
code: test.quantumespresso.pw@localhost
metadata:
Expand Down Expand Up @@ -77,6 +79,7 @@ relax:
scf:
kpoints_distance: 0.15
kpoints_force_parity: false
max_iterations: 5
pw:
code: test.quantumespresso.pw@localhost
metadata:
Expand Down
1 change: 1 addition & 0 deletions tests/workflows/protocols/pw/test_base/test_default.yml
@@ -1,6 +1,7 @@
clean_workdir: false
kpoints_distance: 0.15
kpoints_force_parity: false
max_iterations: 5
pw:
code: test.quantumespresso.pw@localhost
metadata:
Expand Down
2 changes: 2 additions & 0 deletions tests/workflows/protocols/pw/test_relax/test_default.yml
@@ -1,6 +1,7 @@
base:
kpoints_distance: 0.15
kpoints_force_parity: false
max_iterations: 5
pw:
code: test.quantumespresso.pw@localhost
metadata:
Expand Down Expand Up @@ -36,6 +37,7 @@ base:
base_final_scf:
kpoints_distance: 0.15
kpoints_force_parity: false
max_iterations: 5
pw:
code: test.quantumespresso.pw@localhost
metadata:
Expand Down
2 changes: 2 additions & 0 deletions tests/workflows/protocols/test_pdos/test_default.yml
Expand Up @@ -13,6 +13,7 @@ dos:
nscf:
kpoints_distance: 0.1
kpoints_force_parity: false
max_iterations: 5
pw:
code: test.quantumespresso.pw@localhost
metadata:
Expand Down Expand Up @@ -55,6 +56,7 @@ projwfc:
scf:
kpoints_distance: 0.15
kpoints_force_parity: false
max_iterations: 5
pw:
code: test.quantumespresso.pw@localhost
metadata:
Expand Down
Expand Up @@ -6,6 +6,7 @@ kpoints:
- - 0.0
- 0.0
- 0.0
max_iterations: 5
xspectra:
code: test.quantumespresso.xspectra@localhost
core_wfc_data: '# number of core states 3 = 1 0; 2 0;
Expand Down
Expand Up @@ -19,6 +19,7 @@ get_powder_spectrum: false
scf:
kpoints_distance: 0.15
kpoints_force_parity: false
max_iterations: 5
pw:
code: test.quantumespresso.pw@localhost
metadata:
Expand Down
Expand Up @@ -7,6 +7,7 @@ core:
clean_workdir: false
kpoints_distance: 0.15
kpoints_force_parity: false
max_iterations: 5
pw:
code: test.quantumespresso.pw@localhost
metadata:
Expand Down Expand Up @@ -79,6 +80,7 @@ relax:
base:
kpoints_distance: 0.15
kpoints_force_parity: false
max_iterations: 5
pw:
code: test.quantumespresso.pw@localhost
metadata:
Expand Down

0 comments on commit 9061ea5

Please sign in to comment.