<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Times New Roman;color: #000000;font-size: 10pt;">
Dear Youssef<br>
<br>
What comes from the output file of pw is the magnetization integrated in a sphere while projwfc is a Lowdin analysis projected on the atomic wave functions.<br>
The partitionning of electrons is always somewhat arbitrary which explain the difference in local charges and magnetization. The total charge and magnetization coming from projwfc should however be rather close to the true charge provided the splilling parameter
 is OK..<br>
<br>
HTH<br>
<br>
Cyrille<br>
<div><br>
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px"><font size="2">========================<br>
</font>
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px"><font size="2"></font>
<div style="font-family:Tahoma; font-size:13px"><font size="2"></font>
<div style="font-family:Tahoma; font-size:13px"><font size="2"></font>
<div style="font-family:Tahoma; font-size:13px"><b>Cyrille Barreteau</b><br>
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px"><font size="2"><font face="Times New Roman">CEA Saclay<span style="background-color:white"></span></font><font face="Times New Roman">,
</font><font face="Times New Roman"><font face="Times New Roman"><font face="Times New Roman">IRAMIS,</font> SPEC</font></font><font face="Times New Roman"><font face="Times New Roman"><span style="background-color:white"> Bat. 771<br>
</span></font>91191 Gif sur Yvette Cedex<span style="background-color:white"></span>, FRANCE 
<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~</font><br>
<font face="Times New Roman">DTU Nanotech<br>
Ørsteds Plads, building 345E<br>
DK-2800 Kgs. Lyngby,  DENMARK</font><br>
<font face="Times New Roman"><font face="Times New Roman">~~~~~~~~~~~~~~~~~~~~~~~~~~~~</font><br>
</font><font face="Times New Roman"><font face="Times New Roman"><font face="Times New Roman">+33 1 69 08 29 51 /</font></font></font><font face="Times New Roman"><font face="Times New Roman"><font face="Times New Roman"><font face="Times New Roman"><font face="Times New Roman">+33 
 6 47 53 66 52  (mobile)   (Fr)</font></font></font> <br>
</font></font></font><font face="Times New Roman">+45    45 25 63 12<font face="Times New Roman"><font face="Times New Roman">/ +45     28 72 55 18 
</font></font></font><font size="2"><font face="Times New Roman"><font face="Times New Roman"><font face="Times New Roman"><font size="2"><font face="Times New Roman"><font face="Times New Roman"><font face="Times New Roman"><font face="Times New Roman"><font face="Times New Roman">(mobile)</font></font></font></font></font></font></font></font></font></font> 
<font face="Times New Roman">(Dk)</font><br>
<font face="Times New Roman">email:     cyrille.barreteau@cea.fr  /</font><font face="Times New Roman">cyrbar@nanotech.dtu.dk<br>
Web:     <a href="http://iramis.cea.fr/Pisp/cyrille.barreteau/" tabindex="0">http://iramis.cea.fr/Pisp/cyrille.barreteau/</a></font><font size="2"><br>
</font><font size="2">========================</font></div>
</div>
</div>
</div>
<span style="background-color:white; font-family:Times New Roman"><font color="black" size="2"><span dir="ltr" style="font-size:10pt"><font size="2"><span style="font-size:16px"></span></font></span></font></span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF687478"><font color="#000000" face="Tahoma" size="2"><b>De :</b> pw_forum-bounces@pwscf.org [pw_forum-bounces@pwscf.org] de la part de Youssef Aharbil [aharbil@gmail.com]<br>
<b>Envoyé :</b> mercredi 14 janvier 2015 14:39<br>
<b>À :</b> Pw_forum@pwscf.org<br>
<b>Objet :</b> Re: [Pw_forum] Magnetic moment values<br>
</font><br>
</div>
<div></div>
<div>
<div dir="rtl">
<div dir="ltr">Dear All,<br>
</div>
<div dir="ltr"><br>
This is a kind reminder about my question, especially I am waiting a response from the developers of the 5.1 version, what's the main difference the between printed magnetic moment from pw.x and the polarization recollted by projwfc.x?<br>
</div>
</div>
<div class="gmail_extra">
<div dir="ltr"><br>
<div class="gmail_quote">2015-01-01 21:47 GMT+00:00 Youssef Aharbil <span dir="ltr">
<<a href="mailto:aharbil@gmail.com" target="_blank">aharbil@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 .8ex; border-left:1px #ccc solid; border-right:1px #ccc solid; padding-left:1ex; padding-right:1ex">
<div dir="rtl">
<div dir="ltr">Dear Quantum espresso users,<br>
</div>
<div dir="ltr"><br>
Latest version of QE print the magnetic moment per SCF cycle, I think it's good think.<br>
<br>
</div>
<div dir="ltr">but when comparing the values of magnetic moments printed by the last SCF cycle from pw.x and the polarization form projwfc.x , I realized that's :<br>
<br>
1-The values different seriously between one another<br>
</div>
<div dir="ltr">2-The sum of the magnetics moments from projwfc.x agree with the total magnetization moment.<br>
3-The sum of the magnetics moments from pw.x don't agree with the total magnetization moment.<br>
<br>
</div>
<div dir="ltr">Can someone explain me Why?<br>
<br>
</div>
<div dir="ltr">Below the outputs<br>
</div>
<div dir="ltr"><br>
Projwfc.x<br>
<br>
Lowdin Charges: <br>
<br>
     Atom #   1: total charge =  13.3560, s =  2.3377, p =  7.0615, d =  3.9568, <br>
                 spin up      =   6.6471, s =  1.1698, <br>
                 spin up      =   6.6471, p =  3.5293, pz=  1.1764, px=  1.1764, py=  1.1764,
<br>
                 spin up      =   6.6471, d =  1.9480, dz2=  0.4120, dxz=  0.3747, dyz=  0.3747, dx2-y2=  0.4120, dxy=  0.3747,
<br>
                 spin down    =   6.7089, s =  1.1679, <br>
                 spin down    =   6.7089, p =  3.5322, pz=  1.1774, px=  1.1774, py=  1.1774,
<br>
                 spin down    =   6.7089, d =  2.0087, dz2=  0.3995, dxz=  0.4032, dyz=  0.4032, dx2-y2=  0.3995, dxy=  0.4032,
<br>
                 polarization =  -0.0617, s =  0.0018, p = -0.0029, d = -0.0607, <br>
     Atom #   2: total charge =   8.6873, s =  0.3333, p =  1.0208, d =  7.3333, <br>
                 spin up      =   5.6434, s =  0.1712, <br>
                 spin up      =   5.6434, p =  0.5111, pz=  0.1704, px=  0.1704, py=  0.1704,
<br>
                 spin up      =   5.6434, d =  4.9611, dz2=  0.9929, dxz=  0.9918, dyz=  0.9918, dx2-y2=  0.9929, dxy=  0.9918,
<br>
                 spin down    =   3.0439, s =  0.1621, <br>
                 spin down    =   3.0439, p =  0.5097, pz=  0.1699, px=  0.1699, py=  0.1699,
<br>
                 spin down    =   3.0439, d =  2.3722, dz2=  0.1424, dxz=  0.6958, dyz=  0.6958, dx2-y2=  0.1424, dxy=  0.6958,
<br>
                 polarization =   2.5995, s =  0.0091, p =  0.0014, d =  2.5890, <br>
     Atom #   3: total charge =   8.3142, s =  1.9641, p =  6.3501, d =  0.0000, <br>
                 spin up      =   4.1549, s =  0.9809, <br>
                 spin up      =   4.1549, p =  3.1740, pz=  1.0580, px=  1.0580, py=  1.0580,
<br>
                 spin up      =   4.1549, d =  0.0000, dz2=  0.0000, dxz=  0.0000, dyz=  0.0000, dx2-y2=  0.0000, dxy=  0.0000,
<br>
                 spin down    =   4.1593, s =  0.9832, <br>
                 spin down    =   4.1593, p =  3.1761, pz=  1.0587, px=  1.0587, py=  1.0587,
<br>
                 spin down    =   4.1593, d =  0.0000, dz2=  0.0000, dxz=  0.0000, dyz=  0.0000, dx2-y2=  0.0000, dxy=  0.0000,
<br>
                 polarization =  -0.0044, s = -0.0023, p = -0.0021, d =  0.0000, <br>
     Atom #   4: total charge =   8.5059, s =  2.0182, p =  6.4877, d =  0.0000, <br>
                 spin up      =   4.2496, s =  1.0078, <br>
                 spin up      =   4.2496, p =  3.2418, pz=  1.0806, px=  1.0806, py=  1.0806,
<br>
                 spin up      =   4.2496, d =  0.0000, dz2=  0.0000, dxz=  0.0000, dyz=  0.0000, dx2-y2=  0.0000, dxy=  0.0000,
<br>
                 spin down    =   4.2563, s =  1.0104, <br>
                 spin down    =   4.2563, p =  3.2459, pz=  1.0820, px=  1.0820, py=  1.0820,
<br>
                 spin down    =   4.2563, d =  0.0000, dz2=  0.0000, dxz=  0.0000, dyz=  0.0000, dx2-y2=  0.0000, dxy=  0.0000,
<br>
                 polarization =  -0.0067, s = -0.0026, p = -0.0041, d =  0.0000, <br>
     Atom #   5: total charge =   6.6051, s =  1.6515, p =  4.9537, d =  0.0000, <br>
                 spin up      =   3.3426, s =  0.8307, <br>
                 spin up      =   3.3426, p =  2.5118, pz=  0.8518, px=  0.8082, py=  0.8518,
<br>
                 spin up      =   3.3426, d =  0.0000, dz2=  0.0000, dxz=  0.0000, dyz=  0.0000, dx2-y2=  0.0000, dxy=  0.0000,
<br>
                 spin down    =   3.2625, s =  0.8207, <br>
                 spin down    =   3.2625, p =  2.4418, pz=  0.8326, px=  0.7766, py=  0.8326,
<br>
                 spin down    =   3.2625, d =  0.0000, dz2=  0.0000, dxz=  0.0000, dyz=  0.0000, dx2-y2=  0.0000, dxy=  0.0000,
<br>
                 polarization =   0.0800, s =  0.0100, p =  0.0700, d =  0.0000, <br>
     Atom #   6: total charge =   6.6051, s =  1.6515, p =  4.9537, d =  0.0000, <br>
                 spin up      =   3.3426, s =  0.8307, <br>
                 spin up      =   3.3426, p =  2.5118, pz=  0.8518, px=  0.8082, py=  0.8518,
<br>
                 spin up      =   3.3426, d =  0.0000, dz2=  0.0000, dxz=  0.0000, dyz=  0.0000, dx2-y2=  0.0000, dxy=  0.0000,
<br>
                 spin down    =   3.2625, s =  0.8207, <br>
                 spin down    =   3.2625, p =  2.4418, pz=  0.8326, px=  0.7766, py=  0.8326,
<br>
                 spin down    =   3.2625, d =  0.0000, dz2=  0.0000, dxz=  0.0000, dyz=  0.0000, dx2-y2=  0.0000, dxy=  0.0000,
<br>
                 polarization =   0.0800, s =  0.0100, p =  0.0700, d =  0.0000, <br>
     Atom #   7: total charge =   6.6051, s =  1.6515, p =  4.9537, d =  0.0000, <br>
                 spin up      =   3.3426, s =  0.8307, <br>
                 spin up      =   3.3426, p =  2.5118, pz=  0.8518, px=  0.8518, py=  0.8082,
<br>
                 spin up      =   3.3426, d =  0.0000, dz2=  0.0000, dxz=  0.0000, dyz=  0.0000, dx2-y2=  0.0000, dxy=  0.0000,
<br>
                 spin down    =   3.2625, s =  0.8207, <br>
                 spin down    =   3.2625, p =  2.4418, pz=  0.8326, px=  0.8326, py=  0.7766,
<br>
                 spin down    =   3.2625, d =  0.0000, dz2=  0.0000, dxz=  0.0000, dyz=  0.0000, dx2-y2=  0.0000, dxy=  0.0000,
<br>
                 polarization =   0.0800, s =  0.0100, p =  0.0700, d =  0.0000, <br>
     Atom #   8: total charge =   6.6051, s =  1.6515, p =  4.9537, d =  0.0000, <br>
                 spin up      =   3.3426, s =  0.8307, <br>
                 spin up      =   3.3426, p =  2.5118, pz=  0.8518, px=  0.8518, py=  0.8082,
<br>
                 spin up      =   3.3426, d =  0.0000, dz2=  0.0000, dxz=  0.0000, dyz=  0.0000, dx2-y2=  0.0000, dxy=  0.0000,
<br>
                 spin down    =   3.2625, s =  0.8207, <br>
                 spin down    =   3.2625, p =  2.4418, pz=  0.8326, px=  0.8326, py=  0.7766,
<br>
                 spin down    =   3.2625, d =  0.0000, dz2=  0.0000, dxz=  0.0000, dyz=  0.0000, dx2-y2=  0.0000, dxy=  0.0000,
<br>
                 polarization =   0.0800, s =  0.0100, p =  0.0700, d =  0.0000, <br>
     Atom #   9: total charge =   6.6051, s =  1.6515, p =  4.9537, d =  0.0000, <br>
                 spin up      =   3.3426, s =  0.8307, <br>
                 spin up      =   3.3426, p =  2.5118, pz=  0.8082, px=  0.8518, py=  0.8518,
<br>
                 spin up      =   3.3426, d =  0.0000, dz2=  0.0000, dxz=  0.0000, dyz=  0.0000, dx2-y2=  0.0000, dxy=  0.0000,
<br>
                 spin down    =   3.2625, s =  0.8207, <br>
                 spin down    =   3.2625, p =  2.4418, pz=  0.7766, px=  0.8326, py=  0.8326,
<br>
                 spin down    =   3.2625, d =  0.0000, dz2=  0.0000, dxz=  0.0000, dyz=  0.0000, dx2-y2=  0.0000, dxy=  0.0000,
<br>
                 polarization =   0.0800, s =  0.0100, p =  0.0700, d =  0.0000, <br>
     Atom #  10: total charge =   6.6051, s =  1.6515, p =  4.9537, d =  0.0000, <br>
                 spin up      =   3.3426, s =  0.8307, <br>
                 spin up      =   3.3426, p =  2.5118, pz=  0.8082, px=  0.8518, py=  0.8518,
<br>
                 spin up      =   3.3426, d =  0.0000, dz2=  0.0000, dxz=  0.0000, dyz=  0.0000, dx2-y2=  0.0000, dxy=  0.0000,
<br>
                 spin down    =   3.2625, s =  0.8207, <br>
                 spin down    =   3.2625, p =  2.4418, pz=  0.7766, px=  0.8326, py=  0.8326,
<br>
                 spin down    =   3.2625, d =  0.0000, dz2=  0.0000, dxz=  0.0000, dyz=  0.0000, dx2-y2=  0.0000, dxy=  0.0000,
<br>
                 polarization =   0.0800, s =  0.0100, p =  0.0700, d =  0.0000, <br>
     Spilling Parameter:   0.0064<br>
<br>
<br>
<br>
<br>
<br>
From pw.x<br>
<br>
total magnetization       =     3.00 Bohr mag/cell<br>
     absolute magnetization    =     3.18 Bohr mag/cell<br>
<br>
     iteration # 13     ecut=    47.00 Ry     beta=0.50<br>
     Davidson diagonalization with overlap<br>
     ethr =  8.77E-11,  avg # of iterations =  3.1<br>
<br>
     negative rho (up, down):  2.380E-05 2.199E-05<br>
 <br>
     Magnetic moment per site:<br>
     atom:    1    charge:    8.2883    magn:   -0.0139    constr:    0.0000<br>
     atom:    2    charge:    6.6118    magn:    2.5332    constr:    0.0000<br>
     atom:    3    charge:    6.8753    magn:   -0.0027    constr:    0.0000<br>
     atom:    4    charge:    7.6743    magn:   -0.0029    constr:    0.0000<br>
     atom:    5    charge:    5.2873    magn:    0.0670    constr:    0.0000<br>
     atom:    6    charge:    5.2873    magn:    0.0670    constr:    0.0000<br>
     atom:    7    charge:    5.2873    magn:    0.0670    constr:    0.0000<br>
     atom:    8    charge:    5.2873    magn:    0.0670    constr:    0.0000<br>
     atom:    9    charge:    5.2873    magn:    0.0670    constr:    0.0000<br>
     atom:   10    charge:    5.2873    magn:    0.0670    constr:    0.0000<br>
<br>
<br>
<br>
</div>
<div dir="ltr">Thank you in advance.<span class="HOEnZb"><font color="#888888"><br>
<br>
<span><font color="#888888"><font color="#888888">
<div dir="ltr">Youssef Aharbil<br>
</div>
<div dir="ltr">PhD<br>
</div>
<div dir="ltr">Laboratory of Physics and Chemistry of Material<br>
</div>
<div dir="ltr">Morocco</div>
</font></font></span><br>
</font></span></div>
<br>
</div>
</blockquote>
</div>
</div>
<br clear="all">
<br>
-- <br>
<div class="gmail_signature">
<div dir="rtl">والله ولي التوفيق<br>
يوسف أحربيل<br>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>