diff --git a/src/utils/openmc/statepoint.py b/src/utils/openmc/statepoint.py index 9ff38c2b00..7c4f90ae38 100644 --- a/src/utils/openmc/statepoint.py +++ b/src/utils/openmc/statepoint.py @@ -654,14 +654,14 @@ class StatePoint(object): for tally_id, tally in self._tallies.items(): - nuclides = copy.deepcopy(tally._nuclides) + nuclide_zaids = copy.deepcopy(tally._nuclides) - for nuclide_index in nuclides: - tally.remove_nuclide(nuclide_index) - if nuclide_index == -1: + for nuclide_zaid in nuclide_zaids: + tally.remove_nuclide(nuclide_zaid) + if nuclide_zaid == -1: tally.add_nuclide(openmc.Nuclide('total')) else: - tally.add_nuclide(summary.nuclides[nuclide_index]) + tally.add_nuclide(summary.nuclides[nuclide_zaid]) for filter in tally._filters: @@ -730,4 +730,4 @@ class StatePoint(object): if self._hdf5: return str(self._f[path].value) else: - return str(self._get_data(n, 's', 1)[0]) \ No newline at end of file + return str(self._get_data(n, 's', 1)[0]) diff --git a/src/utils/openmc/summary.py b/src/utils/openmc/summary.py index 9bfa50711d..81e0b3bf5d 100644 --- a/src/utils/openmc/summary.py +++ b/src/utils/openmc/summary.py @@ -82,12 +82,12 @@ class Summary(object): # Read the Nuclide's cross-section identifier (e.g., '70c') xs = alias.split('.')[1] - # Initialize this Nuclide and add it to the global dictionary of Nuclides + # Initialize this Nuclide and add to global dictionary of Nuclides if 'nat' in name: - self.nuclides[index] = openmc.Element(name=name, xs=xs) + self.nuclides[zaid] = openmc.Element(name=name, xs=xs) else: - self.nuclides[index] = openmc.Nuclide(name=name, xs=xs) - self.nuclides[index].set_zaid(zaid) + self.nuclides[zaid] = openmc.Nuclide(name=name, xs=xs) + self.nuclides[zaid].set_zaid(zaid) def _read_materials(self):