From 2d01241b533b961ac2c9c4951855b6c2dbeed26a Mon Sep 17 00:00:00 2001 From: Olek <45364492+yardasol@users.noreply.github.com> Date: Thu, 1 Sep 2022 14:33:44 -0500 Subject: [PATCH] Cleanup flow control for detecting nuclides Co-authored-by: Paul Romano --- openmc/material.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/openmc/material.py b/openmc/material.py index 4a988c5979..de4940a47a 100644 --- a/openmc/material.py +++ b/openmc/material.py @@ -438,8 +438,7 @@ class Material(IDManagerMixin): params['percent_type'] = percent_type ## check if nuclide - if str.isdigit(component[-1]) or (component[-1] == 'm' - and str.isdigit(component[-2])): + if not str.isalpha(): self.add_nuclide(component, **params) else: # is element kwargs = params