GrupEstructuraElectronicaSimetria / cosymlib

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

Error en lectura fitxer XYZ #1

Closed abelcarreras closed 3 years ago

abelcarreras commented 3 years ago

he fet un xyz i m’he deixat una linia en blanc al final del fitxer i surt:

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/cosymlib/file_io/init.py", line 55, in get_geometry_from_file_xyz float(line.split()[1]) IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/bin/shape", line 80, in structures = read_generic_structure_file(args.input_file, read_multiple=True) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/cosymlib/file_io/init.py", line 33, in read_generic_structure_file return method(input_name, read_multiple=read_multiple) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/cosymlib/file_io/init.py", line 64, in get_geometry_from_file_xyz name = line.split()[0] IndexError: list index out of range

jo crec que hauriem de fer una lectura una mica mes intel.ligent dels fitxers xyz que et detectes quantes estructures hi ha i quants atoms tenen i que passes de linies en blanc (o amb alguna altra cosa al final). suposo que tambe hauria de detectar si el nombre d’atoms no es correspon al que diu al principi i avisar.