From dd74b2f43f1d2060486de2823ee30058b8971dbd Mon Sep 17 00:00:00 2001 From: Sam Powell-Gill Date: Wed, 19 Feb 2020 09:26:13 +0000 Subject: [PATCH] Fixed bug which prevents creating photon data with no atomic relax --- openmc/data/photon.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openmc/data/photon.py b/openmc/data/photon.py index 32ed3010a..9cc697b78 100644 --- a/openmc/data/photon.py +++ b/openmc/data/photon.py @@ -784,8 +784,9 @@ class IncidentPhoton(EqualityMixin): sub_group = shell_group.create_group(key) # Write atomic relaxation - if key in self.atomic_relaxation.subshells: - self.atomic_relaxation.to_hdf5(sub_group, key) + if self.atomic_relaxation is not None: + if key in self.atomic_relaxation.subshells: + self.atomic_relaxation.to_hdf5(sub_group, key) else: continue