Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated the protocols to accomodate the suggestions proposed on issue #959 in aiidalab_qe. #1052

Merged
merged 5 commits into from
Jan 31, 2025
Merged
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
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
Loading