<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Dear Paolo Giannozzi,<div><br>Your comment is correct.<br><br>Recapitulating, one should change the subroutines symmatrix3 and symtensor3 (both written in<br>the file PW/src/symme.f90)<br>1) The first instruction in both routines is<br> IF (nsym == 1) RETURN<br> This should be changed (in both routines) with<br> IF (nsym > 1) THEN<br>2) then, one should add the line<br> END IF<br>before the comment "Bring to cartesian axis"<br><br><br>To uncover the bug you might run the following example: Silicon bulk<br>in the hexagonal cell with six atoms slightly displaced to kill the symmetries.<br>The pseudopotential is taken from the quantum-espresso database.<br>I report the input files I used for the pwscf and the phonon calculation:<br><br>cat > input_pw <<EOF<br>&control<br> calculation='scf'<br> restart_mode='from_scratch',<br> pseudo_dir = '$PSEUDO_DIR/',<br> outdir='$TMP_DIR/',<br> prefix='si'<br>/<br>&system<br> ibrav= 4, celldm(1) =7.2, celldm(3)=2.44948974278317810d0,<br> nat= 6, ntyp= 1, ecutwfc =55<br>/<br>&electrons<br> diagonalization='david', mixing_beta = 0.7, conv_thr=1.d-12,<br>/<br>/<br>ATOMIC_SPECIES<br>Si 28.085 Si.pw-mt_fhi.UPF<br>ATOMIC_POSITIONS {crystal}<br>Si 0.000100000000 0.000100000000 0.000100000000<br>Si 0.000100000000 0.000000000000 0.250000000000<br>Si 0.333333333333 0.666666666667 0.333333333333<br>Si 0.333333333333 0.666666666667 0.583333333333<br>Si 0.666666666667 0.333333333333 0.666666666667<br>Si 0.666666666667 0.333333333333 0.916666666667<br>K_POINTS {automatic}<br>2 2 1 0 0 1<br>EOF<br><br>cat > input_ph <<EOF<br>phonons of si at Gamma<br>&inputph<br> prefix='si',<br> epsil=.true.,<br> trans=.false.,<br> lraman=.true.,<br> amass(1)=28.0855,<br> outdir='$TMP_DIR/',<br> fildyn='si.dynG',<br>/<br>0.0 0.0 0.0<br>EOF<br><br><br>With the old version of the code (in which the bug is present) the Raman tensor<br>associated to the first atom is:<br> Raman tensor (au^-1) in cartesian axis<br><br> atom 1<br> ( 0.013699086 -3.920153995 5.788324065 )<br> ( -3.920153995 3.923226229 -2.896625782 )<br> ( 5.788324065 -2.896625782 -0.003485967 )<br><br> ( -3.911816105 3.914537535 -2.896540201 )<br> ( 3.914537535 0.014410663 5.790162015 )<br> ( -2.896540201 5.790162015 0.023554646 )<br><br> ( 8.842144308 -4.420575437 -0.000769476 )<br> ( -4.420575437 8.847405130 0.011191688 )<br> ( -0.000769476 0.011191688 -31.777282604 )<br><br><br>After correcting the bug it becomes:<br> Raman tensor (au^-1) in cartesian axis<br><br> atom 1<br> ( 0.013699086 -4.518694758 2.363073404 )<br> ( -4.518694758 0.008662674 -0.001161423 )<br> ( 2.363073404 -0.001161423 -0.000580994 )<br><br> ( -4.509066992 0.002636341 -0.001121079 )<br> ( 0.002636341 4.548354141 2.362756055 )<br> ( -0.001121079 2.362756055 0.004197656 )<br><br> ( 3.609790298 0.000234155 -0.000128246 )<br> ( 0.000234155 3.612924305 0.002079798 )<br> ( -0.000128246 0.002079798 -2.162170216 )<br><br>In order to verify that the second run is correct you can do<br>a third run in which the atomic positions are:<br>Si 0.000000000000 0.000000000000 0.000000000000<br>Si 0.000000000000 0.000000000000 0.250000000000<br>Si 0.333333333333 0.666666666667 0.333333333333<br>Si 0.333333333333 0.666666666667 0.583333333333<br>Si 0.666666666667 0.333333333333 0.666666666667<br>Si 0.666666666667 0.333333333333 0.916666666667<br><br>By doing this, the system has now several symmetries and the bug does not appear.<br>The Raman tensor in this case is:<br> Raman tensor (au^-1) in cartesian axis<br><br> atom 1<br> ( 0.000000000 -4.524263555 2.358129910 )<br> ( -4.524263555 0.000000000 -0.000000000 )<br> ( 2.358129910 -0.000000000 0.000000000 )<br><br> ( -4.524263555 0.000000000 0.000000000 )<br> ( 0.000000000 4.524263555 2.358129910 )<br> ( 0.000000000 2.358129910 -0.000000000 )<br><br> ( 3.592025004 0.000000000 0.000000000 )<br> ( 0.000000000 3.592025004 0.000000000 )<br> ( 0.000000000 0.000000000 -2.186618341 )<br><br><br>Sincerely<div><br></div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Marc Blanchard & Michele Lazzeri</div><div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="orphans: 2; text-align: -webkit-auto; text-indent: 0px; widows: 2; -webkit-text-decorations-in-effect: none; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="orphans: 2; text-align: -webkit-auto; text-indent: 0px; widows: 2; -webkit-text-decorations-in-effect: none; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="orphans: 2; text-align: -webkit-auto; text-indent: 0px; widows: 2; -webkit-text-decorations-in-effect: none; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="orphans: 2; text-indent: 0px; widows: 2; -webkit-text-decorations-in-effect: none; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="orphans: 2; text-indent: 0px; widows: 2; -webkit-text-decorations-in-effect: none; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="orphans: 2; text-indent: 0px; widows: 2; -webkit-text-decorations-in-effect: none; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="orphans: 2; text-indent: 0px; widows: 2; -webkit-text-decorations-in-effect: none; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="orphans: 2; text-indent: 0px; widows: 2; -webkit-text-decorations-in-effect: none; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">___________________________</div><div style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">Dr Marc Blanchard</div><div style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">Equipe de Minéralogie Environnementale</div><div style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">Institut de Minéralogie, de Physique des Matériaux et de Cosmochimie (IMPMC)</div><div style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">UPMC - Sorbonne Universités</div><div style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">Tour 23 - Couloir 23/24 - 4e étage - Bureau 23</div><div style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">Case courrier 115</div><div style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">4 place Jussieu</div><div style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">75252 Paris Cedex 05</div><div style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">Tel: +33 (0)1 44 27 98 22</div><div style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">Fax: +33 (0)1 44 27 37 85</div><div><a href="http://www.impmc.upmc.fr/~blanchard/">http://www.impmc.upmc.fr/~blanchard/</a></div></div></div></div></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span> </div><br><div><div>Le 22 Apr 2016 à 11:45, Paolo Giannozzi a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 22, 2016 at 11:02 AM, Marc Blanchard <span dir="ltr"><<a href="mailto:marc.blanchard@impmc.upmc.fr" target="_blank">marc.blanchard@impmc.upmc.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div>To correct the bug:<br>1) The first instruction in both routines is<br> IF (nsym == 1) RETURN<br> This should be changed (in both routines) with<br> IF (nsym >= 1) THEN<br></div></div></blockquote><div><br></div><div>"If (nsym > 1 THEN", I guess, or else the IF is completely useless. Could you please point to a (simple!) example showing the bug? thank you<br><br></div><div>Paolo<br></div><div><div style="word-wrap:break-word"><div><br>2) then, you should add the line<br> END IF<br>before the comment "Bring to cartesian axis"</div><div><br></div><div><br></div><div>Best regards</div><div><span style="white-space:pre-wrap"> </span></div><div><span style="white-space:pre-wrap"> </span>Marc Blanchard & Michele Lazzeri</div><div><br><div> <span style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><div style="word-wrap:break-word"><span style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><div style="word-wrap:break-word"><span style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><div style="word-wrap:break-word"><span style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><div style="word-wrap:break-word"><span style="text-align:-webkit-auto;text-indent:0px"><div style="word-wrap:break-word"><span style="text-align:-webkit-auto;text-indent:0px"><div style="word-wrap:break-word"><span style="text-align:-webkit-auto;text-indent:0px"><div style="word-wrap:break-word"><span style="text-indent:0px"><div style="word-wrap:break-word"><span style="text-indent:0px"><div style="word-wrap:break-word"><span style="text-indent:0px"><div style="word-wrap:break-word"><span style="text-indent:0px"><div style="word-wrap:break-word"><span style="text-indent:0px"><div style="word-wrap:break-word"><div><div style="word-wrap:break-word"><div style="word-wrap:break-word"><div style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-transform:none;white-space:normal;word-spacing:0px">___________________________</div><div style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-transform:none;white-space:normal;word-spacing:0px">Dr Marc Blanchard</div><div style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-transform:none;white-space:normal;word-spacing:0px">Equipe de Minéralogie Environnementale</div><div style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-transform:none;white-space:normal;word-spacing:0px">Institut de Minéralogie, de Physique des Matériaux et de Cosmochimie (IMPMC)</div><div style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-transform:none;white-space:normal;word-spacing:0px">UPMC - Sorbonne Universités</div><div style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-transform:none;white-space:normal;word-spacing:0px">Tour 23 - Couloir 23/24 - 4e étage - Bureau 23</div><div style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-transform:none;white-space:normal;word-spacing:0px">Case courrier 115</div><div style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-transform:none;white-space:normal;word-spacing:0px">4 place Jussieu</div><div style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-transform:none;white-space:normal;word-spacing:0px">75252 Paris Cedex 05</div><div style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-transform:none;white-space:normal;word-spacing:0px">Tel: <a href="tel:%2B33%20%280%291%2044%2027%2098%2022" value="+33144279822" target="_blank">+33 (0)1 44 27 98 22</a></div><div style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-transform:none;white-space:normal;word-spacing:0px">Fax: <a href="tel:%2B33%20%280%291%2044%2027%2037%2085" value="+33144273785" target="_blank">+33 (0)1 44 27 37 85</a></div><div><a href="http://www.impmc.upmc.fr/~blanchard/" target="_blank">http://www.impmc.upmc.fr/~blanchard/</a></div></div></div></div></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span> </div><br></div></div><br>_______________________________________________<br> Pw_forum mailing list<br> <a href="mailto:Pw_forum@pwscf.org">Pw_forum@pwscf.org</a><br> <a href="http://pwscf.org/mailman/listinfo/pw_forum" rel="noreferrer" target="_blank">http://pwscf.org/mailman/listinfo/pw_forum</a><br></div></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Paolo Giannozzi, Dip. Scienze Matematiche Informatiche e Fisiche,<br>Univ. Udine, via delle Scienze 208, 33100 Udine, Italy<br>Phone +39-0432-558216, fax +39-0432-558222<br><br></div></div></div></div></div> </div></div></blockquote></div><br></div></div></body></html>