Merge pull request #2205 from yardasol/add_components_metastable_fix

Fix errorneous behavior when adding metastable nuclides via `add_components`
This commit is contained in:
Paul Romano 2022-09-07 16:45:06 -05:00 committed by GitHub
commit b779141b57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -438,7 +438,7 @@ class Material(IDManagerMixin):
params['percent_type'] = percent_type
## check if nuclide
if str.isdigit(component[-1]):
if not component.isalpha():
self.add_nuclide(component, **params)
else: # is element
kwargs = params

View file

@ -32,6 +32,7 @@ def test_add_components():
'O16': 1.0,
'Zr': 1.0,
'O': 1.0,
'Ag110_m1': 1.0,
'U': {'percent': 1.0,
'enrichment': 4.5},
'Li': {'percent': 1.0,