Skip to content
Open
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
12 changes: 6 additions & 6 deletions src/aiida_quantumespresso/calculations/ph.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
from aiida.common import datastructures, exceptions
from aiida.common.warnings import AiidaDeprecationWarning

from aiida_quantumespresso.calculations import _uppercase_dict
from aiida_quantumespresso.calculations import _lowercase_dict, _uppercase_dict
from aiida_quantumespresso.calculations.pw import PwCalculation
from aiida_quantumespresso.utils.convert import convert_input_to_namelist_entry
from aiida_quantumespresso.utils.validation.parameters import validate_parameters

from .base import CalcJob

Expand Down Expand Up @@ -64,7 +63,7 @@ def define(cls, spec):
spec.input('metadata.options.parser_name', valid_type=str, default='quantumespresso.ph')
spec.input('metadata.options.withmpi', valid_type=bool, default=True)
spec.input('qpoints', valid_type=orm.KpointsData, help='qpoint mesh')
spec.input('parameters', valid_type=orm.Dict, help='', validator=validate_parameters)
spec.input('parameters', valid_type=orm.Dict, help='')
spec.input('settings', valid_type=orm.Dict, required=False, help='')
spec.input('parent_folder', valid_type=orm.RemoteData, help='the folder of a completed `PwCalculation`')
spec.output('output_parameters', valid_type=orm.Dict)
Expand Down Expand Up @@ -169,7 +168,8 @@ def prepare_for_submission(self, folder):
raise exceptions.InputValidationError(msg) from exception
parent_calc_out_subfolder = settings.pop('PARENT_CALC_OUT_SUBFOLDER', default_parent_output_folder)

parameters = self.inputs.parameters.get_dict()
parameters = _uppercase_dict(self.inputs.parameters.get_dict(), dict_name='parameters')
parameters = {k: _lowercase_dict(v, dict_name=k) for k, v in parameters.items()}

prepare_for_d3 = settings.pop('PREPARE_FOR_D3', False)
if prepare_for_d3:
Expand Down Expand Up @@ -337,7 +337,7 @@ def prepare_for_submission(self, folder):
self._FOLDER_DYNAMICAL_MATRIX,
)
)
if parameters['INPUTPH'].get('electron_phonon', None) is not None:
if parameters.get('INPUTPH', {}).get('electron_phonon', None) is not None:
remote_symlink_list.append(
(
parent_folder.computer.uuid,
Expand All @@ -361,7 +361,7 @@ def prepare_for_submission(self, folder):
'.',
)
)
if parameters['INPUTPH'].get('electron_phonon', None) is not None:
if parameters.get('INPUTPH', {}).get('electron_phonon', None) is not None:
remote_copy_list.append(
(
parent_folder.computer.uuid,
Expand Down
4 changes: 2 additions & 2 deletions src/aiida_quantumespresso/parsers/matdyn.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def parse_raw_matdyn_phonon_file(phonon_frequencies):
parsed_data['warnings'].append('Bad formatting of frequencies')
return parsed_data

counter = 3
counter = 4
for i in range(num_kpoints):
for j in range(num_bands):
try:
Expand All @@ -148,7 +148,7 @@ def parse_raw_matdyn_phonon_file(phonon_frequencies):
parsed_data['warnings'].append('Error while parsing the frequencies, dimension exceeded')
return parsed_data
counter += 1
counter += 3 # move past the kpoint coordinates
counter += 4

parsed_data['phonon_bands'] = freq_matrix

Expand Down