Skip to content

Commit

Permalink
Minor updates to support more phonopy features
Browse files Browse the repository at this point in the history
  • Loading branch information
atztogo committed Jul 31, 2020
1 parent d410a9a commit 1cd134a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
7 changes: 6 additions & 1 deletion aiida_phonopy/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ def generate_phonopy_cells(phonon_settings,

ph = get_phonopy_instance(structure, ph_settings, {})
if dataset is None:
ph.generate_displacements(distance=ph_settings['distance'])
supported_keys = (
'distance', 'is_plusminus', 'is_diagonal', 'is_trigonal',
'number_of_snapshots', 'random_seed')
kwargs = {key: ph_settings[key]
for key in ph_settings if key in supported_keys}
ph.generate_displacements(**kwargs)
else:
ph.dataset = dataset.get_dict()

Expand Down
2 changes: 1 addition & 1 deletion aiida_phonopy/parsers/phonopy.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def parse(self, **kwargs):

band_filename = self.node.inputs.band_structure_filename.value
if band_filename in list_of_files:
if 'symmetry' in self.node.inputs.settings:
if 'symmetry' in self.node.inputs.settings.attributes:
sym_dataset = self.node.inputs.settings['symmetry']
label = "%s (%d)" % (sym_dataset['international'],
sym_dataset['number'])
Expand Down
1 change: 0 additions & 1 deletion aiida_phonopy/workflows/iter_ha.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"""


@calcfunction
def get_random_displacements(structure,
number_of_snapshots,
temperature,
Expand Down

0 comments on commit 1cd134a

Please sign in to comment.