<div dir="ltr">Well, in this case the task might become more cumbersome.<br>CP2K usually prints everything in the spherical basis representation. Afaik only the MOs can be printed in the Cartesian representation:<br><a href="http://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/DFT/PRINT/MO.html#list_CARTESIAN">http://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/DFT/PRINT/MO.html#list_CARTESIAN</a><br>If you want to perform everything in a separate code, then you have first to transform the density matrix to the Cartesian representation. Take care to employ the right contraction coefficients and normalisation factors. Finally note the order of the spherical and Cartesian orbitals.<br><br>Good luck,<br><br>Matthias<br><br><br>On Tuesday, April 15, 2014 6:06:14 PM UTC+2, Sascha Brück wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi,<br><br>this would be an idea, however, i just noticed that this is not useful for me because i do not want to be bound to cp2k writing out data as i process the density matrix in my own code, so i need the information about how to evaluate the density from the density matrix. I tried the above formula with the norms given in the output file but it seemed not to give sensible results.<br><br>I hope I can get some more information about the basis functions and how to use them to compute the density.<br><br>Kind regards<br>Sascha<br><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">Am Dienstag, 15. April 2014 17:12:34 UTC+2 schrieb Matthias Krack:</blockquote><blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Sascha,<br><br>cp2k calculates the density at the FFT grid points. You may calculate the density yourself as you describe, but it is possibly easier to use a fine grid by specifying a relatively large cutoff and then to read the cube file with an external program which evaluates the density at the points you are interested in by (trilinear) interpolation.<br><br>Matthias<br><br>On Tuesday, April 15, 2014 3:11:44 PM UTC+2, Sascha Brück wrote:<blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi,<br><br>in cp2k, i can write out the density into a cube file, but it will be evaluated at grid points computed by cp2k. If I like to use my own grid with different points where I want to evaluate the density, is there a way to read in that information?<br><br>If not, it should be easy to evaluate the density by oneself by just summing the density matrix and the basis functions<br><br>rho(x_grid,y_grid,z_grid)=sum_<wbr>{i,j} P_{i,j} * phi_i (x_grid-x_atom(i),y_grid-y_<wbr>atom(i),z_grid-z_atom(i)) * phi_j (x_grid-x_atom(j),y_grid-y_<wbr>atom(j),z_grid-z_atom(j))<br><br>where phi_i (x,y,z)=norm_i * pow(x,lx_i) * pow(y,ly_i)* pow(z,lz_i) * exp( -alpha_i*(x^2+y^2+z^2));<br><br>all coordinates are in bohr radius and alpha_i is from the basis file and the angular momenta are ordered like 1s 1px 1py 1pz 2s 2px 2py 2pz ...<br><br>Is this formula right? Or do I have to transform to spherical basis functions (even for s and p)? How do i compute the norm?<br><br>Best regards<br>Sascha <br></div></blockquote></div></blockquote></div></div></div></blockquote></div>