libAtoms / ExtXYZ.jl

Extended XYZ read/write support for Julia
MIT License
13 stars 6 forks source link

Files with missing cell #37

Closed cortner closed 1 year ago

cortner commented 1 year ago

Just tried to read an xyz file that Ilyes sent me, a dataset of cumulene molecules in vacuum, therefore no cell is defined and the "cell" is missing entirely. Could the package be extended to allow this or is this when pbc = "FFF" and specifiy an automatic cubic cell that includes all particles.?

But maybe it goes against the specification of the format?

Example:

13
Properties=species:S:1:pos:R:3:forces:R:3 energy=-66.79083251953125 pbc="F F F"
C       -5.13553286       0.00000000       0.00000000       0.00006186      -0.00000000       0.00000000
H       -5.72485781      -0.91726500       0.00000000      -0.00001280       0.00000756       0.00000000
H       -5.72485781       0.91726500       0.00000000      -0.00001280      -0.00000756      -0.00000000
C       -3.82464290       0.00000000       0.00000000      -0.00004186       0.00000000       0.00000000
C       -2.55226111       0.00000000       0.00000000       0.00003090      -0.00000000      -0.00000000
C       -1.27494299       0.00000000       0.00000000      -0.00009426       0.00000000      -0.00000000
C        0.00000000       0.00000000       0.00000000       0.00000000      -0.00000000      -0.00000000
C        1.27494299       0.00000000       0.00000000       0.00009426       0.00000000       0.00000000
C        2.55226111       0.00000000       0.00000000      -0.00003090      -0.00000000       0.00000000
C        3.82464290       0.00000000       0.00000000       0.00004186       0.00000000      -0.00000000
H        5.72485781       0.00000000       0.91726500       0.00001280      -0.00000000      -0.00000756
H        5.72485781       0.00000000      -0.91726500       0.00001280       0.00000000       0.00000756
C        5.13553286       0.00000000       0.00000000      -0.00006186      -0.00000000      -0.00000000
cortner commented 1 year ago

btw - completely not urgent, I just fixed the xyz file and can now load it. It just seemed like a sensible default to build in.

jameskermode commented 1 year ago

This should now be fixed in master: if cell is missing then AtomsBase bounding_box() interface returns an infinite box.