Open ElliottKasoar opened 1 year ago
this is brilliant catch.. I was looking exactly today at converting some data to extxyz and I noticed the issue. the problem is more confusing since in theory n2p2 uses runner convention of units but in reality one can pass to input.data to n2p2 whatever consistent units one likes.
Currently,
Dataset.write_extxyz_file
will always write in units of eV/Ang when called viaDataset.write
.Although in reality these may always be the desired units, it is inconsistent with all other formats, which default to eV/Ang (apart from n2p2), but can be written with other units if explicitly passed. Units passed in the case of extxyz files will be ignored, which may cause confusion.
The simplest solution would be to remove
self.change_units_all(units)
, and therefore also theunits
parameter forDataset.write_extxyz_file
, allowing all unit conversions to be handled by the mainDataset.write
function, as is already the case for n2p2 and all other formats.