<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Dear all,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">As I understand it, the wavefunction for each k-point is given by ecv(:,:), with the first index representing a single particle basis and the second index representing each band. I'm guessing that when a normalized wavefunction
is contracted over the S matrix, the result should equal one for each band. What I think this would look like in code is:<br>
</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"><span style="font-family: "Arial Black", Arial, sans-serif;"> sum = 0</span><br>
</p>
<p style="margin-top:0;margin-bottom:0"><span style="font-family: "Arial Black", Arial, sans-serif;"> DO i = 1,npwx</span></p>
<p style="margin-top:0;margin-bottom:0"><span style="font-family: "Arial Black", Arial, sans-serif;"> DO j = 1,npwx</span></p>
<p style="margin-top:0;margin-bottom:0"><span style="font-family: "Arial Black", Arial, sans-serif;"> sum = sum + evc(i,b) * S(i,j) *
</span><span style="font-family: "Arial Black", Arial, sans-serif;">evc(j,b)</span></p>
<p style="margin-top:0;margin-bottom:0"><span style="font-family: "Arial Black", Arial, sans-serif;"> END DO</span></p>
<p style="margin-top:0;margin-bottom:0"><span style="font-family: "Arial Black", Arial, sans-serif;"> END DO</span></p>
<p style="margin-top:0;margin-bottom:0"><span><br>
</span></p>
<p style="margin-top:0;margin-bottom:0"><span>and sum should equal 1 for any band b. Is my understanding correct?</span></p>
<p style="margin-top:0;margin-bottom:0"><span><br>
</span></p>
<p style="margin-top:0;margin-bottom:0"><span>Best regards,<br>
</span></p>
<p style="margin-top:0;margin-bottom:0"><span>John McFarland<br>
</span></p>
</div>
</body>
</html>