Skip to content

Commit

Permalink
improved if/else statement
Browse files Browse the repository at this point in the history
  • Loading branch information
akvatol committed Aug 20, 2024
1 parent 9d7eb9a commit 5ff019e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion aiida_crystal_dft/parsers/cry_pycrystal.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ def parse_out_trajectory(self, _):
# Scince supercell have more atoms than regular cell;
# traj.set_structurelist(structs) will throw an error https://github.com/aiidateam/aiida-core/blob/71422eb872040a9ba23047d2ec031f6deaa6a7cc/src/aiida/orm/nodes/data/array/trajectory.py#L202
# There are no reason for tracking trajectory in phonon calculation, so it will return None
if self.stdout_parser.info['phonons']['modes']:
modes = self.stdout_parser.info['phonons'].get(['modes'], {})
if modes and len(modes) > 1:
self._logger.warning(f"Caught ValueError for node with label '{self._node.label}': {e}")
return None
else:
Expand Down

0 comments on commit 5ff019e

Please sign in to comment.