1919def generate_workchain_phonon (generate_workchain , generate_inputs_pw_base ):
2020 """Generate an instance of a `PhononWorkChain`."""
2121
22- def _generate_workchain_phonon (structure = None , append_inputs = None , return_inputs = False ):
22+ def _generate_workchain_phonon (structure = None , append_inputs = None , return_inputs = False , the_inputs = None ):
2323 entry_point = 'vibroscopy.phonons.phonon'
2424 scf_inputs = generate_inputs_pw_base ()
2525
@@ -31,6 +31,7 @@ def _generate_workchain_phonon(structure=None, append_inputs=None, return_inputs
3131 'scf' : scf_inputs ,
3232 'settings' : {
3333 'sleep_submission_time' : 0. ,
34+ 'max_concurrent_base_workchains' : - 1 ,
3435 },
3536 'symmetry' : {},
3637 }
@@ -41,6 +42,9 @@ def _generate_workchain_phonon(structure=None, append_inputs=None, return_inputs
4142 if append_inputs is not None :
4243 inputs .update (append_inputs )
4344
45+ if the_inputs is not None :
46+ inputs = the_inputs
47+
4448 process = generate_workchain (entry_point , inputs )
4549
4650 return process
@@ -193,6 +197,15 @@ def test_set_reference_kpoints(generate_workchain_phonon):
193197
194198 assert 'kpoints' in process .ctx
195199
200+ inputs = generate_workchain_phonon (return_inputs = True )
201+ inputs ['scf' ].pop ('kpoints' )
202+ inputs ['scf' ]['kpoints_distance' ] = 0.1
203+ process = generate_workchain_phonon (the_inputs = inputs )
204+ process .setup ()
205+ process .set_reference_kpoints ()
206+
207+ assert 'kpoints' in process .ctx
208+
196209
197210@pytest .mark .usefixtures ('aiida_profile' )
198211def test_run_base_supercell (generate_workchain_phonon ):
0 commit comments