diff --git a/openmc/data/data.py b/openmc/data/data.py index 8ee3b287c..4a3ebbf32 100644 --- a/openmc/data/data.py +++ b/openmc/data/data.py @@ -196,6 +196,9 @@ NEUTRON_MASS = 1.00866491588 # Used in atomic_mass function as a cache _ATOMIC_MASS = {} +# Regex for GND nuclide names (used in zam function) +_GND_NAME_RE = re.compile(r'([A-Zn][a-z]*)(\d+)((?:_[em]\d+)?)') + def atomic_mass(isotope): """Return atomic mass of isotope in atomic mass units. @@ -401,9 +404,6 @@ def gnd_name(Z, A, m=0): return '{}{}'.format(ATOMIC_SYMBOL[Z], A) -_GND_NAME_RE = re.compile(r'([A-Zn][a-z]*)(\d+)((?:_[em]\d+)?)') - - def zam(name): """Return tuple of (atomic number, mass number, metastable state)