<div dir="ltr">Hello Shahrbano,<div><br></div><div>If check the refereed post you find the following about the compatibility issue of WIEN2k v12 or later with WIEN2WANNIER v0.96 or older</div><div><br></div><div>========================================================</div>
<div><pre style="font-family:courier,&#39;courier new&#39;,monospace;font-size:14px;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);line-height:19px">&quot;We came across a minor compatibility issue between WIEN2WANNIER and a newer
version Wien2k (v12 and above).</pre><pre style="font-family:courier,&#39;courier new&#39;,monospace;font-size:14px;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);line-height:19px">
Apparently, the complex calculation is not resolved properly by w2w. The
following line in &#39;w2w&#39; script searches for a pattern &quot;lapw1  -c&quot; in a
dayfile

tmp=&quot;$(grep &quot;lapw1  -c&quot; &quot;$SEEDNAME.dayfile&quot;)&quot;

However, the number of spaces between &#39;lapw1&#39; and &#39;-c&#39; has changes in
wien2k while going from v11 to v12 and higher. As a result, the complex
calculation is not identified properly.

I suggest to change the line to the following (note the space between 1 and
*)

tmp=&quot;$(grep &quot;lapw1 *-c&quot; &quot;$SEEDNAME.dayfile&quot;)&quot;

This code is compatible with any number of spaces.

The modification is absolutely critical for proper calculation of
polarization with BerryPi.&quot;</pre><pre style="font-family:courier,&#39;courier new&#39;,monospace;font-size:14px;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);line-height:19px">
=========================================================</pre><pre style="font-size:14px;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);line-height:19px"><font face="arial, helvetica, sans-serif">That was the compatibility issue taken from <a href="http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg09119.html" style="font-size:small;line-height:normal">http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg09119.html</a></font></pre>
<pre style="font-size:14px;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);line-height:19px"><font face="arial, helvetica, sans-serif"><br></font></pre><pre style="font-size:14px;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);line-height:19px">
<font face="arial, helvetica, sans-serif"><br></font></pre><pre style="font-size:14px;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);line-height:19px"><font face="arial, helvetica, sans-serif">Another source of error could be from the older version of BerryPI which was using a different phase wrapping method. That was causing some issues to bring the phases between 0 to 2*pi or -pi to +pi range when some of the phases were close to 0 (may be positive or negative). The method  was completely ignoring those smaller values instead of unwarpping all the phases to same range. As a result, you would have phase values like 1.999*pi 1.99996*pi 1.9994*pi <u>-0.0001*pi</u> instead of 1.999*pi 1.99996*pi 1.9994*pi <u>1.9999*pi.</u> This would have messed up your average phase value and polarization.</font></pre>
<pre style="font-size:14px;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);line-height:19px"><font face="arial, helvetica, sans-serif"><br></font></pre><pre style="font-size:14px;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);line-height:19px">
<font face="arial, helvetica, sans-serif"><br></font></pre><pre style="font-size:14px;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);line-height:19px"><font face="arial, helvetica, sans-serif">Also regarding the Numpy version, We actually haven&#39;t tested BerryPI any Numpy older than v1.6.2. This is why the init.sh tries to ignore the older versions.</font></pre>
<pre style="font-size:14px;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);line-height:19px"><font face="arial, helvetica, sans-serif"><br></font></pre><pre style="font-size:14px;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);line-height:19px">
<font face="arial, helvetica, sans-serif">Hope this will help.</font></pre><pre style="font-size:14px;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);line-height:19px"><font face="arial, helvetica, sans-serif"><br>
</font></pre><pre style="font-size:14px;white-space:pre-wrap;word-wrap:break-word;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0);line-height:19px"><font face="arial, helvetica, sans-serif">Sheikh  </font></pre></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, Nov 27, 2013 at 2:14 PM, Shahrbano Raheme <span dir="ltr">&lt;<a href="mailto:sbh6016@yahoo.com" target="_blank">sbh6016@yahoo.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div style="font-size:12pt;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,Sans-Serif"><div style="margin-bottom:0in" align="LEFT"><br clear="none"></div><div style="margin-bottom:0in" align="LEFT">
Dear Prof. Rubel and Prof. Sheikh,</div><div>
<font face="Calibri"><span style="border-collapse:collapse;font-size:11px"><br clear="none"></span></font></div><div><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px">&gt; 1) Take the structure files enclosed (I assume they are not different from yours).</span></div>

<div><span style="border-collapse:collapse;font-family:HelveticaNeue,&#39;Helvetica Neue&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,sans-serif;font-size:16px">I used your stature file and found that it is identical to my structure.</span></div>

<div><span style="border-collapse:collapse"><font face="HelveticaNeue, &#39;Helvetica Neue&#39;, Helvetica, Arial, &#39;Lucida Grande&#39;, sans-serif" size="3"><br clear="none">
</font></span></div><div><div><span style="border-collapse:collapse;font-family:Calibri;font-size:11px">&gt;Please, make sure that you have the latest version of WIEN2WANNIER (see the post <a rel="nofollow" shape="rect" href="https://mail.google.com/mail/%22" style="color:rgb(17,85,204)" target="_blank"><span style="text-decoration:underline;color:rgb(5,61,245)">http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg09119.html</span></a>).</span></div>

<div><span style="border-collapse:collapse;font-family:Calibri;font-size:11px"><br clear="none"></span></div></div><div><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"></span><div>
<span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"></span><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 10px/normal Arial">
&gt; My computed effective charge seems to almost the same as computed by Dr. Rubel. </div></div><span style="border-collapse:collapse;font-family:Arial;font-size:10px">I think you are using older versions of either BerryPI or Wien2Wannier or both. Please use the latest version of BerryPI (v1.0) <a rel="nofollow" shape="rect" href="https://github.com/spichardo/BerryPI%22%20%5Ct%20%22_blank" style="color:rgb(17,85,204)" target="_blank"><span style="font:normal normal normal 12px/normal &#39;Times New Roman&#39;;text-decoration:underline;color:rgb(5,61,245)">https://github.com/spichardo/BerryPI</span></a><span style="font:normal normal normal 12px/normal &#39;Times New Roman&#39;"> and Wien2Wannier (v0.97) <a rel="nofollow" shape="rect" href="http://www.wien2k.at/reg_user/unsupported/wien2wannier/%22%20%5Ct%20%22_blank" style="color:rgb(17,85,204)" target="_blank"><span style="text-decoration:underline;color:rgb(5,61,245)">http://www.wien2k.at/reg_user/unsupported/wien2wannier/</span></a>.</span></span><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"></span><span style="border-collapse:collapse;font-family:&#39;Times New Roman&#39;;font-size:12px">The
 older version of BerryPI (v0.1) had some problem in wrapping of phases 
which has been fixed in version 1.0. Also, the older versions of 
Wien2wannier was having an issue in identifying the complex calculation <span style="font:normal normal normal 10px/normal Arial">(see the post <a rel="nofollow" shape="rect" href="http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg09119.html%22%20%5Ct%20%22_blank" style="color:rgb(17,85,204)" target="_blank"><span style="text-decoration:underline;color:rgb(5,61,245)">http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg09119.html</span></a>)</span></span><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"></span><div>

<span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"></span></div></div><div><span style="border-collapse:collapse"><font face="HelveticaNeue, &#39;Helvetica Neue&#39;, Helvetica, Arial, &#39;Lucida Grande&#39;, sans-serif" size="3"><br clear="none">

</font></span></div><div><span style="border-collapse:collapse"><font face="HelveticaNeue, &#39;Helvetica Neue&#39;, Helvetica, Arial, &#39;Lucida Grande&#39;, sans-serif" size="3">I
 installed the latest version of BerriPI, WIEN2WANNIER, WANNIER90, 
NUMPHY, and could reproduce the results of Prof. Rubel in agreement with
 reported values in literature. But, we still do not know what was the 
source of problem of the </font></span><span style="border-collapse:collapse;font-family:HelveticaNeue,&#39;Helvetica Neue&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,sans-serif;font-size:medium">BerryPI or WIEN2WANNIER </span><span style="border-collapse:collapse;font-family:HelveticaNeue,&#39;Helvetica Neue&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,sans-serif;font-size:medium">old version which resulted in an unsatisfactory result. We are interested in realizing the bug(s)  of the old version(s).</span></div>

<div><span style="border-collapse:collapse;font-family:HelveticaNeue,&#39;Helvetica Neue&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,sans-serif;font-size:medium"> </span></div>
<div><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px">&gt;
 2) create directories &#39;lambda1&#39; and &#39;lambda2&#39;. In both cases I displace
 the Ga atom by +0.01 and -0.01 along z-axis. There is nothing specific 
about the choice of displacements. In fact 0.005 should work too. I 
encourage you to test the convergence and plot Z as a function of 
displacement. I do not recommend to go for displacements larger than 
0.01</span><span style="border-collapse:collapse"><font face="HelveticaNeue, &#39;Helvetica Neue&#39;, Helvetica, Arial, &#39;Lucida Grande&#39;, sans-serif" size="3"><br clear="none">
</font></span><span style="border-collapse:collapse;font-family:HelveticaNeue,&#39;Helvetica Neue&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,sans-serif"></span><div style="font-size:large">
<span style="border-collapse:collapse;font-family:HelveticaNeue,&#39;Helvetica Neue&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,sans-serif;font-size:16px"><br clear="none"></span></div><div>
<font size="3">I did it, and the results which nicely confirm your prediction, do not depend on the Z.</font></div><div><font size="3"><br clear="none"></font></div>
<div><font size="3">Now I am working on your following comments:</font></div><div><font size="3"><br clear="none"></font></div><div>
<div style="margin:0.0px 0.0px 0.0px 0.0px;font:12.0px &#39;Times New Roman&#39;">&gt; In order to address the spontaneous polarization, we need two cases:<br clear="none">
(a) the initial reference structure and<br clear="none">
(b) your relaxed structure.<br clear="none">
The spontaneous polarization is the difference between them. Please, 
look in the literature what is used as a reference structure. The choice
 of structure (a) for GaN is not obvious to me. Once you determine that,
 I can help you to move on.<br clear="none">
</div><div style="margin:0.0px 0.0px 0.0px 0.0px;font:12.0px &#39;Times New Roman&#39;"><br clear="none"></div></div><span style="border-collapse:collapse;font-family:HelveticaNeue,&#39;Helvetica Neue&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,sans-serif;font-size:medium">Would you give me some clue to reach the goal sooner? </span><span style="border-collapse:collapse;font-family:HelveticaNeue,&#39;Helvetica Neue&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,sans-serif"></span><div>

<font size="3"><br clear="none"></font></div><div><font size="3">PS:
 We detected that init.sh ha a bug. If the version of the installed 
numpy is 1.6.2, the init.sh works fine. But, if the version is different
 depending on the linux version, e.g., numpy 1.4.1, then init.sh script 
tries to install numpy 1.6.2 on .local directory. This is not necessary,
 as already bumpy 1.4.1 is installed. Although the installation on 
.local directory is successful by init.sh, but init.sh cannot uses it, 
because it is not installed in the default path. So, for such a case, we
 changed 1.6.2 to 1.4.1 in init.sh to prevent its stop in changing the 
.bashrc automatically. We just thought that you maybe in next version 
would like to fix this small bug.</font></div>
<div><font size="3"> </font></div><span style="border-collapse:collapse;font-family:HelveticaNeue,&#39;Helvetica Neue&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,sans-serif;font-size:medium">Thank you for your attentions,</span><span style="border-collapse:collapse;font-family:HelveticaNeue,&#39;Helvetica Neue&#39;,Helvetica,Arial,&#39;Lucida Grande&#39;,sans-serif;font-size:16px"></span><div dir="ltr" style="margin-bottom:0in" align="LEFT">

SH.Rahimi</div></div></div></div><br>_______________________________________________<br>
Wien mailing list<br>
<a href="mailto:Wien@zeus.theochem.tuwien.ac.at">Wien@zeus.theochem.tuwien.ac.at</a><br>
<a href="http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien" target="_blank">http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien</a><br>
SEARCH the MAILING-LIST at:  <a href="http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html" target="_blank">http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html</a><br>
<br></blockquote></div><br></div></div>