From 17a4ce86d00da905d87e627c1b4430a4b5472247 Mon Sep 17 00:00:00 2001 From: Edward Linscott Date: Wed, 9 Oct 2024 17:08:32 +0200 Subject: [PATCH] Added catch for when spglib symmetry check fails --- src/koopmans/workflows/_workflow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/koopmans/workflows/_workflow.py b/src/koopmans/workflows/_workflow.py index f3cd420dc..ec2ff2623 100644 --- a/src/koopmans/workflows/_workflow.py +++ b/src/koopmans/workflows/_workflow.py @@ -569,7 +569,7 @@ def _run_sanity_checks(self): # Check symmetry of the system dataset = symmetrize.check_symmetry(self.atoms, 1e-6, verbose=False) - if dataset['number'] not in range(195, 231): + if dataset is None or dataset['number'] not in range(195, 231): utils.warn('This system is not cubic and will therefore not have a uniform dielectric tensor. However, ' 'the image-correction schemes that are currently implemented assume a uniform dielectric. ' 'Proceed with caution')