How to tansform densities onto grids?



I tried to use a similar method as in the Psi4numpy tutorial DFT/LDA to transform the densities on to grids. But I am not really confident about the way I was doing. Is there a recommended or standard method to do this?

Thank you!


Can you describe “not accurate”? The current tutorials detail how this is accomplished and are correct.



Sorry I did not make it clear. I was just not confident about the my code. The way I was doing was to follow your block approach in the LDA tutorial and use grid point weights to time the density matrix. This will give a very small number on the points close to the nucleus. I guess I did not fully understand it so I post it here in the education section.

Thank you.