This problem is generically problematic for different software packages since there is no standardized format for storing grid values.
In my software package sisl
the interaction with Siesta grid output files is seamless and converts between the most common formats, cube and xsf files.
For instance to convert the Rho.grid.nc
to a cube or xsf file, simply do:
sgrid Rho.grid.nc Rho.cube
Generally a cube file also needs to know the geometry to see it in visualization, so one needs to attach the geometry as well. Additionally one can compute differences (say spin), here is an example:
sgrid Rho.grid.nc{0} --geometry RUN.fdf --diff Rho.grid.nc{1} diff_up-down.cube
which takes the difference between the 1st and 2nd spin-components and stores them in diff_up_down.cube
.
All of the above commands also works for the binary .VT
etc. files that siesta outputs.
They can also be used for VASP, although there are probably some corner case files that I haven't thought about.