<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Dear all:</p>
<p>I am having a little trouble understanding how to read and
manipulate the wavefunction of a nscf calculation. (My final goal
is to build matrix elements of type <k+q|exp^(+i(q+G)r)|k> )</p>
<p>I have followed the program wfck2r.f90 in which a calculation is
loaded and the wavefunction is transformed into real space and
saved to the disk, but I do not understand fully the the ordering
of C_k(G) elements and maybe somebody could help me. <br>
</p>
<p>at some point of the code after loading the calculation the
wavefunction is read by:<br>
</p>
<p>DO ik = first_k, last_k<br>
<br>
npw = ngk(ik)<br>
CALL davcio (evc, 2*nwordwfc, iunwfc, ik, - 1)<br>
<br>
If I print on the screen for a check , the values of evc and
evc(igk_k) corresponding to the first 4 planewaves, (1st band )<br>
</p>
<p> WRITE(*,*) evc(1,1), evc(igk_k(1,ik),1)<br>
WRITE(*,*) evc(2,1), evc(igk_k(2,ik),1)<br>
WRITE(*,*) evc(3,1), evc(igk_k(3,ik),1)<br>
WRITE(*,*) evc(4,1), evc(igk_k(4,ik),1)</p>
<p>it turns out that the ordering that I get, does not match the
order of the file K000"ik"/evc.dat file except for the gamma point
which of course, always agrees.</p>
<p>In other words, after converting to xml using iotk the file
K00002/evc.dat, although I can identify the values they are
disordered with respect to evc or evc(igk_k). For instance ik=3<br>
</p>
<p>Screen ik=3<br>
</p>
<p><b> evc (ig,1)
evc igk_k ((1,3),1)</b><br>
(-0.259592093457288,-0.577862862809762)
(-0.259592093457288,-0.577862862809762)<br>
(-0.623388775544561,0.112694178864960)
(0.130227173344509,-7.741477644355699E-002)<br>
(0.130227182144171,-7.741477133293871E-002)
(-0.623388775544561,0.112694178864960)<br>
(0.130227173344509,-7.741477644355699E-002)
(9.798387850941684E-003,0.151182528291742)<br>
</p>
<p><b>K00003/evc.xml</b><br>
</p>
<p><?xml version="1.0"?><br>
<?iotk version="1.2.0"?><br>
<?iotk file_version="1.0"?><br>
<?iotk binary="F"?><br>
<?iotk qe_syntax="F"?><br>
<WFC><br>
<INFO ngw="631" igwx="464" gamma_only="F" nbnd="20" ik="3"
nk="16" ispin="1" nspin="1"
scale_factor="1.000000000000000E+000"/><br>
<evc.1 type="complex" size="464"><br>
-2.595920934572880E-001,-5.778628628097616E-001<br>
1.302271821441705E-001,-7.741477133293871E-002<br>
-6.551644050809464E-002, 4.102286385954088E-003<br>
-6.233887755445614E-001, 1.126941788649597E-001<br>
</p>
<p>Thank you very much in advance for any help!</p>
<p>Aritz</p>
<p>Univ. of the Basque country<br>
</p>
<p><br>
</p>
</body>
</html>