spirit-code / spirit

Atomistic Spin Simulation Framework
http://spirit-code.github.io
MIT License
117 stars 52 forks source link

Core: OVF file output is not in valid OVF 2.0 format #504

Closed GPMueller closed 5 years ago

GPMueller commented 5 years ago

The xbase etc parameters are definitely being written incorrectly. Probably there are more problems, see https://github.com/spirit-code/ovf#file-format-v20-specification-

GPMueller commented 5 years ago

A main issue here is how to handle multi-atom basis cells. The atomistic use-case is essentially a mixture of a regular lattice (defined by Bravais vectors) and an irregular basis cell. Technically, the OVF specs forbid adding keywords which could add the necessary information.

Option 1

The main drawback is that the OVF specification says irregular grids should specify the positions alongside the data, which (for our purposes) unnecessarily increases the file size.

Option 2

The main drawback is that it is harder to check the correspondence of the geometry inside the State and the geometry inside the File Segment and an "encoding" would be required. For example: the number of basis cell atoms could go into the Na count.

Option 3

This would have the significant disadvantage that the files could not be read in by micromagnetic codes which strictly adhere to the OVF specs.

Questions

GPMueller commented 5 years ago

Added spirit-code/ovf to thirdparty libraries with cb6d1770465b4e4d277383491d5efe8a3fc630b6 on branch feature-ovf-library, started using it with fe1b8bcb94d50a883e89065a854d6f02ab8b5907.

Implemented "irregular" lattice output by always using rectangular, where n_cells_x contains also the number of atoms per cell.

GPMueller commented 5 years ago

Merged with ef9bc0a8364b9e00556ab12243b46ea6f79c94dc.