Closed aannabe closed 1 week ago
Just want to add that the reason I looked at this is to rule out any possible bugs. Having the norm close to the correct value provides a good sanity check.
Thanks Gani. Big improvement. Happy to merge this. Are there any arguments against using an even higher precision? Using the same format as QE is one argument, but why not choose bigger files?... Does a couple of extra digits gain much?
I just tried to improve the accuracy while maintaining the same file size. Slightly increasing further to 14.8E
shows even better norm:
Max Density: 0.000694446266
Norm: 5.000000000032804
File Size: 126 MB
This is with a [200x200x200] grid (the increase in file size with denser grids will be steeper). But overall the file size is still acceptable I think, and I have now pushed it to 14.8E
.
Test this please
Proposed changes
A common way to analyze charge/spin densities in qmcpack is to generate the
*.xsf
data files viaqdens
that reads the data from the nativestat.h5
files. The xsf files can then be further analyzed viaqdens-radial
or other tools. Currently, the data (such as charge density) in the xsf files are written as floats with 8 significant digits (12.8f
). I think scientific notation is better for this type of data. For example, QE (v7.0) uses scientific notation with 6 significant digits (12.6E
). In a simple test I did, the integrated charge (norm) has improved significantly using the12.6E
style for CH4 molecules in a 16^3 Ang box. Here the correct norm is 5.Old code:
New code:
The accuracy can be further improved at the expense of a larger file size.
What type(s) of changes does this code introduce?
Does this introduce a breaking change?
What systems has this change been tested on?
Checklist