diff --git a/src/aiida_quantumespresso/workflows/protocols/ph/base.yaml b/src/aiida_quantumespresso/workflows/protocols/ph/base.yaml index 503750d45..126c6b836 100644 --- a/src/aiida_quantumespresso/workflows/protocols/ph/base.yaml +++ b/src/aiida_quantumespresso/workflows/protocols/ph/base.yaml @@ -1,5 +1,6 @@ default_inputs: clean_workdir: False + max_iterations: 5 ph: metadata: options: diff --git a/src/aiida_quantumespresso/workflows/protocols/pw/base.yaml b/src/aiida_quantumespresso/workflows/protocols/pw/base.yaml index 200edd9da..b8f93db1c 100644 --- a/src/aiida_quantumespresso/workflows/protocols/pw/base.yaml +++ b/src/aiida_quantumespresso/workflows/protocols/pw/base.yaml @@ -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 diff --git a/src/aiida_quantumespresso/workflows/protocols/xspectra/base.yaml b/src/aiida_quantumespresso/workflows/protocols/xspectra/base.yaml index b96eb9fe7..7cc855fe8 100644 --- a/src/aiida_quantumespresso/workflows/protocols/xspectra/base.yaml +++ b/src/aiida_quantumespresso/workflows/protocols/xspectra/base.yaml @@ -2,6 +2,7 @@ default_inputs: clean_workdir: False kpoints_distance: 0.15 kpoints_force_parity: False + max_iterations: 5 xspectra: parameters: INPUT_XSPECTRA: diff --git a/src/aiida_quantumespresso/workflows/pw/base.py b/src/aiida_quantumespresso/workflows/pw/base.py index cfea4d4a9..fccac5114 100644 --- a/src/aiida_quantumespresso/workflows/pw/base.py +++ b/src/aiida_quantumespresso/workflows/pw/base.py @@ -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 diff --git a/src/aiida_quantumespresso/workflows/xspectra/base.py b/src/aiida_quantumespresso/workflows/xspectra/base.py index 7ee8e6d35..52413850e 100644 --- a/src/aiida_quantumespresso/workflows/xspectra/base.py +++ b/src/aiida_quantumespresso/workflows/xspectra/base.py @@ -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 diff --git a/tests/workflows/protocols/pw/test_bands/test_default.yml b/tests/workflows/protocols/pw/test_bands/test_default.yml index f3ab01bde..f1b73428b 100644 --- a/tests/workflows/protocols/pw/test_bands/test_default.yml +++ b/tests/workflows/protocols/pw/test_bands/test_default.yml @@ -1,4 +1,5 @@ bands: + max_iterations: 5 pw: code: test.quantumespresso.pw@localhost metadata: @@ -39,6 +40,7 @@ relax: base: kpoints_distance: 0.15 kpoints_force_parity: false + max_iterations: 5 pw: code: test.quantumespresso.pw@localhost metadata: @@ -77,6 +79,7 @@ relax: scf: kpoints_distance: 0.15 kpoints_force_parity: false + max_iterations: 5 pw: code: test.quantumespresso.pw@localhost metadata: diff --git a/tests/workflows/protocols/pw/test_base/test_default.yml b/tests/workflows/protocols/pw/test_base/test_default.yml index 3e08ba059..0e7179be1 100644 --- a/tests/workflows/protocols/pw/test_base/test_default.yml +++ b/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: diff --git a/tests/workflows/protocols/pw/test_relax/test_default.yml b/tests/workflows/protocols/pw/test_relax/test_default.yml index 10ad26638..56684a53a 100644 --- a/tests/workflows/protocols/pw/test_relax/test_default.yml +++ b/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: @@ -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: diff --git a/tests/workflows/protocols/test_pdos/test_default.yml b/tests/workflows/protocols/test_pdos/test_default.yml index ac1c27ad6..991b87fec 100644 --- a/tests/workflows/protocols/test_pdos/test_default.yml +++ b/tests/workflows/protocols/test_pdos/test_default.yml @@ -13,6 +13,7 @@ dos: nscf: kpoints_distance: 0.1 kpoints_force_parity: false + max_iterations: 5 pw: code: test.quantumespresso.pw@localhost metadata: @@ -55,6 +56,7 @@ projwfc: scf: kpoints_distance: 0.15 kpoints_force_parity: false + max_iterations: 5 pw: code: test.quantumespresso.pw@localhost metadata: diff --git a/tests/workflows/protocols/xspectra/test_base/test_default.yml b/tests/workflows/protocols/xspectra/test_base/test_default.yml index ffefc8c2f..b41746ee8 100644 --- a/tests/workflows/protocols/xspectra/test_base/test_default.yml +++ b/tests/workflows/protocols/xspectra/test_base/test_default.yml @@ -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; diff --git a/tests/workflows/protocols/xspectra/test_core/test_default.yml b/tests/workflows/protocols/xspectra/test_core/test_default.yml index 982fac60f..5b329bde6 100644 --- a/tests/workflows/protocols/xspectra/test_core/test_default.yml +++ b/tests/workflows/protocols/xspectra/test_core/test_default.yml @@ -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: diff --git a/tests/workflows/protocols/xspectra/test_crystal/test_default.yml b/tests/workflows/protocols/xspectra/test_crystal/test_default.yml index ee0c5bc9b..e2a310b3c 100644 --- a/tests/workflows/protocols/xspectra/test_crystal/test_default.yml +++ b/tests/workflows/protocols/xspectra/test_crystal/test_default.yml @@ -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: @@ -79,6 +80,7 @@ relax: base: kpoints_distance: 0.15 kpoints_force_parity: false + max_iterations: 5 pw: code: test.quantumespresso.pw@localhost metadata: