Skip to content

Commit

Permalink
add support for xyz files with scientific notation
Browse files Browse the repository at this point in the history
  • Loading branch information
aandi committed Oct 13, 2015
1 parent d65aae9 commit 5cad920
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion calculate_rmsd
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def get_coordinates(filename, ignore_hydrogens=False):
break

atom = re.findall(r'[a-zA-Z]+', line)[0]
numbers = re.findall(r'[-]?\d+\.\d*', line)
numbers = re.findall(r'[-]?\d+\.\d*(?:[Ee][-\+]\d+)?', line)
numbers = [float(number) for number in numbers]

# ignore hydrogens
Expand Down

0 comments on commit 5cad920

Please sign in to comment.