To better support the atomistic use-case, it would be nice to extend the OVF file format by additional fields in the header.
The main problem with the current OVF format is that crystal lattices, consisting of a bravais lattice plus an additional basis cannot be efficiently modelled. They are neither rectangular nor is it necessary to explicitly save all of the positions in three extra columns. Therefore no of the possible meshtype values (rectangular orirregular) really fits.
I suggest to introduce meshtype lattice, which, if set, would require
bravaisa a list of three values, giving the bravais vector in the first direction in terms of the meshunit
bravaisb see above
bravaisc see above
anodes number of cells in direction a
bnodes see above
cnodes see above
ncellpoints number of points per cell of the lattice
Lastly, one would need to save the basis vectors. About this part I am the least sure, since there seems to be no good precedent for how to format this in the OVF 2.0 spec.
A few options that come to mind:
Of all these, Option 4 breaks the previous OVF specification the least, but it's also the ugliest in my opinion. I would probably prefer Option 1 and thus allow multiline header fields.
One concern is of course the compatibility with the OVF 2.0 format, which unfortunately does not allow for the addition of arbitrary fields in the header.
I can imagine that it would be practicable to introduce a new file ending ".aovf" (for atomistic OVF).
Then I would implement a compatibility mode in this library, which would allow one to save (and read) AOVF files in a format that is compatible to OVF 2.0 (by prefixing the new fields with comments + some special character, e.g ##%).
Im not familiar with the pegtl library used here, so I am not sure how much of a hassle it would be to implement this.
Atomistic OVF file extension
To better support the atomistic use-case, it would be nice to extend the OVF file format by additional fields in the header.
The main problem with the current OVF format is that crystal lattices, consisting of a bravais lattice plus an additional basis cannot be efficiently modelled. They are neither rectangular nor is it necessary to explicitly save all of the positions in three extra columns. Therefore no of the possible
meshtype
values (rectangular
orirregular
) really fits.I suggest to introduce
meshtype lattice
, which, if set, would requirebravaisa
a list of three values, giving the bravais vector in the first direction in terms of themeshunit
bravaisb
see abovebravaisc
see aboveanodes
number of cells in direction abnodes
see abovecnodes
see abovencellpoints
number of points per cell of the latticeLastly, one would need to save the basis vectors. About this part I am the least sure, since there seems to be no good precedent for how to format this in the OVF 2.0 spec. A few options that come to mind:
Of all these, Option 4 breaks the previous OVF specification the least, but it's also the ugliest in my opinion. I would probably prefer Option 1 and thus allow multiline header fields.
One concern is of course the compatibility with the OVF 2.0 format, which unfortunately does not allow for the addition of arbitrary fields in the header. I can imagine that it would be practicable to introduce a new file ending ".aovf" (for atomistic OVF). Then I would implement a compatibility mode in this library, which would allow one to save (and read) AOVF files in a format that is compatible to OVF 2.0 (by prefixing the new fields with comments + some special character, e.g
##%
).Im not familiar with the pegtl library used here, so I am not sure how much of a hassle it would be to implement this.
A file in AOVF format could look like this:
And the same file in compatibility mode could look like this: