Open stigrj opened 4 years ago
Thanks for reporting! Can you please attach the cubes to the issue or link them from the issue? Then I will have a look into the code ...
Thanks, this is a He density plotted on [-4,4]^3
, first point (-4, -4, -4)
last point (4, 4, 4)
. Paraview
places this density symmetrically around the atom, but blob
places it slightly askew: rho.txt
I think perhaps blob
interprets the first point to be -4 + h
instead of -4
. I originally thought this was how the cube file should be interpreted, so I implemented the MRChem plotter to make a grid with n+2
points in each direction, and then excluded all boundary points, e.i. first point at -4 + h
and last point 4-h
, but it turns out to be inconsistent with paraview
.
It seems Blob plots the function skewed compared to paraview.
I was able to get a symmetric plot of a He density with Blob using this cube header, step length computed as
h = L/(n + 1) = 8.0/26 = 3.076923e-01
but this gives a non-symmetric plot in paraview (atomic coordinate is not at the center of the density). With paraview, on the other hand, the following cube plot becomes symmetric, step length computed as
h = L/(n - 1) = 8.0/24 = 3.333333e-01