Skip to content

Commit

Permalink
Updated the protocols to accomodate the suggestions proposed on issue #…
Browse files Browse the repository at this point in the history
…959 in aiidalab_qe. (#1052)

Updated the protocols to accommodate the suggestions proposed by G.Pizzi on issue #959 in aiidalab_qe

---------

Co-authored-by: Andres Ortega-Guerrero <[email protected]>
  • Loading branch information
Minotakm and AndresOrtegaGuerrero authored Jan 31, 2025
1 parent bcd5508 commit c5617c0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/aiida_quantumespresso/workflows/pdos.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ def validate_nscf(value, _):
parameters = value['pw']['parameters'].get_dict()
if parameters.get('CONTROL', {}).get('calculation', 'scf') != 'nscf':
return '`CONTOL.calculation` in `nscf.pw.parameters` is not set to `nscf`.'
if parameters.get('SYSTEM', {}).get('occupations', None) != 'tetrahedra':
return '`SYSTEM.occupations` in `nscf.pw.parameters` is not set to `tetrahedra`.'
if not parameters.get('SYSTEM', {}).get('occupations', '').startswith('tetrahedra'):
return '`SYSTEM.occupations` in `nscf.pw.parameters` is not set to one of the `tetrahedra` options.'


def validate_dos(value, _):
Expand Down
6 changes: 3 additions & 3 deletions src/aiida_quantumespresso/workflows/protocols/pdos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ default_inputs:
calculation: nscf
restart_mode: from_scratch
SYSTEM:
occupations: tetrahedra
occupations: tetrahedra_opt
nosym: True
dos:
parameters:
DOS:
DeltaE: 0.02
DeltaE: 0.01
metadata:
options:
resources:
Expand All @@ -28,7 +28,7 @@ default_inputs:
projwfc:
parameters:
PROJWFC:
DeltaE: 0.02
DeltaE: 0.01
metadata:
options:
resources:
Expand Down
2 changes: 1 addition & 1 deletion tests/workflows/protocols/test_pdos.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def test_electronic_type(get_pdos_generator_inputs):
builder = PdosWorkChain.get_builder_from_protocol(
**get_pdos_generator_inputs, electronic_type=ElectronicType.INSULATOR
)
for namespace, occupations in zip((builder.scf, builder.nscf), ('fixed', 'tetrahedra')):
for namespace, occupations in zip((builder.scf, builder.nscf), ('fixed', 'tetrahedra_opt')):
parameters = namespace['pw']['parameters'].get_dict()
assert parameters['SYSTEM']['occupations'] == occupations
assert 'degauss' not in parameters['SYSTEM']
Expand Down
6 changes: 3 additions & 3 deletions tests/workflows/protocols/test_pdos/test_default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dos:
withmpi: true
parameters:
DOS:
DeltaE: 0.02
DeltaE: 0.01
nscf:
kpoints_distance: 0.1
kpoints_force_parity: false
Expand Down Expand Up @@ -39,7 +39,7 @@ nscf:
ecutrho: 240.0
ecutwfc: 30.0
nosym: true
occupations: tetrahedra
occupations: tetrahedra_opt
pseudos:
Si: Si<md5=57fa15d98af99972c7b7aa5c179b0bb8>
projwfc:
Expand All @@ -52,7 +52,7 @@ projwfc:
withmpi: true
parameters:
PROJWFC:
DeltaE: 0.02
DeltaE: 0.01
scf:
kpoints_distance: 0.15
kpoints_force_parity: false
Expand Down

0 comments on commit c5617c0

Please sign in to comment.