popelier-group / ichor

Computational Chemistry Data Management Library for Machine Learning Force Field Development
https://ichor.readthedocs.io/
MIT License
9 stars 10 forks source link

XYZ class #37

Closed FabioFalcioni closed 10 months ago

FabioFalcioni commented 1 year ago

If I read an .xyz that already has the atom labels with an ordered (or unordered) number, the XYZ class will currently add an additional number label on top of the current labels.

e.g. -> example.xyz

2

C1 0.0 0.0 0.0 C2 0.0 0.0 0.0

C11 0.0 0.0 0.0 C22 0.0 0.0 0.0

That could give various issues.

m-julian commented 10 months ago

The xyz file format should be like so (from https://en.wikipedia.org/wiki/XYZ_file_format)

<number of atoms>
comment line
<element> <X> <Y> <Z>
...

so including the atom name (e.g. C1) would make it a different format. I think we should stick to the regular formatting because changing will solve this issue but cause issues in the case where one expects to find elements in the first column but instead finds atom names..