From 9d7eb9a3f05a12002310babb880dcab960bc9961 Mon Sep 17 00:00:00 2001 From: Anton Domnin Date: Tue, 20 Aug 2024 19:18:03 +0300 Subject: [PATCH] Improved if/else statement --- aiida_crystal_dft/parsers/cry_pycrystal.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aiida_crystal_dft/parsers/cry_pycrystal.py b/aiida_crystal_dft/parsers/cry_pycrystal.py index 803244d..4aa2b37 100644 --- a/aiida_crystal_dft/parsers/cry_pycrystal.py +++ b/aiida_crystal_dft/parsers/cry_pycrystal.py @@ -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: