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 b19ec40 commit 9d7eb9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aiida_crystal_dft/parsers/cry_pycrystal.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ def parse_out_trajectory(self, _):
except ValueError as e:
# Fix for calculation with SCELPHO keyword;
# 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
# 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 "Phonon" in self._node.label:
if self.stdout_parser.info['phonons']['modes']:
self._logger.warning(f"Caught ValueError for node with label '{self._node.label}': {e}")
return None
else:
Expand Down

0 comments on commit 9d7eb9a

Please sign in to comment.