Reading RHO files from siesta converts the units from 1/Bohr^3 to 1/Ang^3.
However, when subsequently writing to a cube file it doesn't know that it is a density, and hence it doesn't change anything.
So it just writes it in 1/Ang^3, which results in problems... :(
Describe the issue
Reading
RHO
files from siesta converts the units from1/Bohr^3
to1/Ang^3
.However, when subsequently writing to a
cube
file it doesn't know that it is a density, and hence it doesn't change anything. So it just writes it in1/Ang^3
, which results in problems... :(The current solution is to do:
The scaling factor can be calculated using:
Ideally physical quantities could hold a unit specification.
The problem with the grids are that not all things are densities, e.g. potentials do not have a volume density, they are scalar values at grid-points.