Skip to content

Commit

Permalink
Update package/MDAnalysis/topology/guessers.py
Browse files Browse the repository at this point in the history
Co-authored-by: Rocco Meli <[email protected]>
  • Loading branch information
pillose and RMeli authored Aug 15, 2023
1 parent 7b5285a commit ed4bbb4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions package/MDAnalysis/topology/guessers.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,7 @@ def guess_atom_element(atomname):
no_numbers = re.split(NUMBERS, no_symbols)
no_numbers = list(filter(None, no_numbers)) #remove ''
# if no_numbers is not empty, use the first element of no_numbers
if no_numbers:
name = list(filter(None, no_numbers))[0].upper()
else:
name = ''
name = list(filter(None, no_numbers))[0].upper() if no_numbers else ''

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

0 comments on commit ed4bbb4

Please sign in to comment.