GrupEstructuraElectronicaSimetria / cosymlib

Documentation
https://cosymlib.readthedocs.io/
MIT License
1 stars 1 forks source link

Issue reading XYZ files #4

Closed abelcarreras closed 3 years ago

abelcarreras commented 3 years ago

Something wrong when reading XYZ files with long?/spaces? comments

Ex: 5 Calcul anells C feble B fort / interaccio mitja C 1.303068499 0.000000000 0.000000000
C 0.506643354 1.227657970 0.000000000
C -0.926250976 0.939345948 0.000000000
C -0.926250976 -0.939345948 0.000000000
C 0.506643354 -1.227657970 0.000000000

Traceback (most recent call last): File "/Users/abel/PycharmProjects/cosymlib/scripts/chirality", line 83, in <module> structures = read_generic_structure_file(args.input_file, read_multiple=True) File "/Users/abel/PycharmProjects/cosymlib/cosymlib/file_io/__init__.py", line 50, in read_generic_structure_file return method(input_name, read_multiple=read_multiple) File "/Users/abel/PycharmProjects/cosymlib/cosymlib/file_io/__init__.py", line 72, in get_geometry_from_file_xyz float(line.split()[1]) ValueError: could not convert string to float: 'anells'

efrembernuz commented 3 years ago

The problem should be fixed for the new version.