From 78b03bba8a9c772b0366a5db54b26880cd7382d7 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Tue, 7 Apr 2020 13:32:54 -0500 Subject: [PATCH] Moved _GND_NAME_RE with other global variables in data.py --- openmc/data/data.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)