<div dir="ltr"><div><div>Ok many thanks for the reply, and sorry for the delay.<br><br></div>1- To check this problem I made a simple scf calculation for H atom in a cubic cell with 8 k points and when I run wfck2r now I get nks = 8, so I do not think it is a bug, I will try to figure out what is wrong with my other calculation but I think there is a problem with my input<br></div>2- So you are saying that the wave functions I get are the coefficients u_nk(r) in Psi_nk(r) = u_nk(r) e^ikr . These cannot be used to reconstruct the density in real space because they are on the smooth grid . This smooth grid is always given by the expression <br><div><div><div><span class="gmail-">r_ijk(:) = (i-1)/nr1x * a_1(:) + (j-1)/nr2x * a_2(:) + (k-1)/nr3x * a_3(:) ?</span></div><div><span class="gmail-">This function u_nk(r) does not seem to be normalized, what is the normalization factor ? are these the same wave functions used in the routine hpsi to compute the product with the local part of the potential ?</span></div><div><span class="gmail-"><br></span></div><div><span class="gmail-">I am sorry for all these questions, but before using this object I want to be sure what it is exactly. So I really appreciate your effort in answering these question.</span></div><div><span class="gmail-"><br></span></div><div><span class="gmail-">Jacopo Simoni</span></div><div><span class="gmail-">Los Alamos National Laboratory, Theoretical Division<br></span></div><div><span class="gmail-"> <br></span></div><div><div><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Lorenzo Paulatto</b> <span dir="ltr"><<a href="mailto:paulatz@gmail.com">paulatz@gmail.com</a>></span><br>Date: 27 September 2017 at 01:36<br>Subject: Re: [Pw_forum] shape of real space wave functions in wfc2kr<br>To: Jacopo Simoni <<a href="mailto:simonij@tcd.ie">simonij@tcd.ie</a>><br><br><br><span class="gmail-">> 1- why the number of k points (nks) is 1, even if I have in the restart folder 8 k points ? the fact that in the code there is a cycle over nks suggests that I can have more k points, I do not understand.<br>
><br>
<br></span>
It isn't.. can you provide a simple example where you noticed this problem?<span class="gmail-"><br>
<br>
<br>
> 2- in my case dffts%nnr = dffts%nr1x * dffts%nr2x * dffts%nr3x, does this mean that the total number of points in the real grid is equal to the total number of points in the FFT grid ?<br>
> in particular I have nr1x=nr2x=nr3x=160, with nnr=4096000, while npwx=256119. The total number of points nnr is considerably higher than the number of plane waves, does this mean that the plane wave grid is supplemented with 4096000-256119=3839881 zeros, am I right ?<br>
><br>
<br></span>
Yes, as long as we stick to g-space. Keep in mind that what is really stored i "u" the periodic part of the wavefunction, without the exp(ikr) envelope. Only the plane waves such that |G+k|^2 < ecutwfc (i.e. a sphere) are used for u_k, but more are needed when doing the Fourier transform (because you need a box, not a sphere), and even more when doing charge density the square of wavefunctions is always computed in real space, on a dense grid). Also, npwx is a per-processor maximum.<br>
<br>
All these values are printed at the beginning:<br>
     Parallelization info<br>
     --------------------<br>
sticks:   dense  smooth     PW     G-vecs:    dense   smooth      PW<br>
Min         530     269     81                 8627     3055     539<br>
Max         531     270     82                 8628     3056     542<br>
Sum        1061     539    163                17255     6111    1081<br>
<br>
"dense" is the charge-density grid<br>
"smooth" is the grid of wavefunction squared (4*ecutwfc)<br>
"PW" is the grid of wavefunctions<span class="gmail-"><br>
<br>
<br>
> 3- the real space wave function evc_r(:,1) that I obtain in output from the invfft routine can be reconstructed on the unit cell according to the following index notation:<br>
> index = i + (j-1) * nr1x + (k-1) * nr2x * nr1x<br>
> r_ijk(:) = (i-1)/nr1x * a_1(:) + (j-1)/nr2x * a_2(:) + (k-1)/nr3x * a_3(:)<br>
> is this true or I am missing something ?<br>
<br>
<br>
<br>
<br>
><br>
> I really appreciate any help about these questions. Many thanks in advance.<br>
><br>
> Jacopo Simoni<br>
> Los Alamos National Laboratory, Theoretical division.<br>
><br>
><br></span>
> ______________________________<wbr>_________________<br>
> Pw_forum mailing list<br>
> <a href="mailto:Pw_forum@pwscf.org" target="_blank">Pw_forum@pwscf.org</a><br>
> <a href="http://pwscf.org/mailman/listinfo/pw_forum" rel="noreferrer" target="_blank">http://pwscf.org/mailman/listi<wbr>nfo/pw_forum</a><br>
><span class="gmail-HOEnZb"><font color="#888888"><br>
<br>
-- <br>
</font></span></div><br></div></div></div></div></div>