spirit-code / spirit

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

write out interpolated energies when not yet calculated #479

Open SpiritSuperUser opened 5 years ago

SpiritSuperUser commented 5 years ago

I think it should be checked during the writing of the interpolated energies of a chain whether the data is actually already calculated or not. It does not make sense to write out a list of zeros if the data was not yet calculated. This occurs when one reads in a pre-calculated chain and directly wants to write interpolated energies to a file. Ie, when no iteration was done yet. Either a warning should be thrown or the energies should be calculated on the fly and written out afterwards.

GPMueller commented 4 years ago

This behaviour in Spirit is non-obvious (see also the recent issue #566) and should either be changed or clearly documented. It needs to be clear when it is necessary to call chain.update_data and when not. Similarly, it is not obvious when system.update_data is needed. Even less clear is when, if ever, chain.setup_data is needed.

GPMueller commented 4 years ago

Note, this is related to what I suggested in issue #100.