Skip to content

Commit

Permalink
add filter for number before atom type
Browse files Browse the repository at this point in the history
  • Loading branch information
pillose committed Jun 14, 2023
1 parent a37728f commit 342d9a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package/MDAnalysis/topology/guessers.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ def guess_atom_element(atomname):
except KeyError:
# strip symbols and numbers
no_symbols = re.sub(SYMBOLS, '', atomname)
name = re.split(NUMBERS, no_symbols)[0]
no_numbers = re.split(NUMBERS, no_symbols)
name = list(filter(None, no_numbers))[0]

# just in case
if name in tables.atomelements:
Expand Down

0 comments on commit 342d9a8

Please sign in to comment.