<p style="color:#000000;font-family:SimSun;font-size:13px;font-style:normal;font-variant:normal;font-weight:400;letter-spacing:normal;margin-bottom:5px;margin-left:0px;margin-right:0px;margin-top:0px;orphans:2;overflow-wrap:break-word;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;-webkit-text-stroke-width:0px;white-space:normal;word-spacing:0px;">
<span style="font-size:16px;">Dear Paolo,</span>
</p>
<p style="color:#000000;font-family:SimSun;font-size:13px;font-style:normal;font-variant:normal;font-weight:400;letter-spacing:normal;margin-bottom:5px;margin-left:0px;margin-right:0px;margin-top:0px;orphans:2;overflow-wrap:break-word;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;-webkit-text-stroke-width:0px;white-space:normal;word-spacing:0px;">
<span style="font-size:16px;"><br>
</span>
</p>
<p style="color:#000000;font-family:SimSun;font-size:13px;font-style:normal;font-variant:normal;font-weight:400;letter-spacing:normal;margin-bottom:5px;margin-left:0px;margin-right:0px;margin-top:0px;orphans:2;overflow-wrap:break-word;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;-webkit-text-stroke-width:0px;white-space:normal;word-spacing:0px;">
<span style="background-color:#FFFFFF;color:#000000;display:inline;float:none;font-family:&font-size:14px;font-variant:normal;font-weight:400;letter-spacing:normal;orphans:2;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;-webkit-text-stroke-width:0px;white-space:normal;word-spacing:0px;"><span style="font-size:18px;"><strong>"plotrho" was devised to be run interactively</strong></span></span><span style="font-size:18px;"><strong>.</strong></span>
</p>
<p style="color:#000000;font-family:SimSun;font-size:13px;font-style:normal;font-variant:normal;font-weight:400;letter-spacing:normal;margin-bottom:5px;margin-left:0px;margin-right:0px;margin-top:0px;orphans:2;overflow-wrap:break-word;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;-webkit-text-stroke-width:0px;white-space:normal;word-spacing:0px;">
<span style="font-size:16px;">Now I see. I ignored that unit=5 denotes input from the keyboard by default. Thank you.</span>
</p>
<p style="color:#000000;font-family:SimSun;font-size:13px;font-style:normal;font-variant:normal;font-weight:400;letter-spacing:normal;margin-bottom:5px;margin-left:0px;margin-right:0px;margin-top:0px;orphans:2;overflow-wrap:break-word;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;-webkit-text-stroke-width:0px;white-space:normal;word-spacing:0px;">
<br>
</p>
<p style="color:#000000;font-family:SimSun;font-size:13px;font-style:normal;font-variant:normal;font-weight:400;letter-spacing:normal;margin-bottom:5px;margin-left:0px;margin-right:0px;margin-top:0px;orphans:2;overflow-wrap:break-word;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;-webkit-text-stroke-width:0px;white-space:normal;word-spacing:0px;">
<span style="font-size:16px;">Best regards,</span>
</p>
<p style="color:#000000;font-family:SimSun;font-size:13px;font-style:normal;font-variant:normal;font-weight:400;letter-spacing:normal;margin-bottom:5px;margin-left:0px;margin-right:0px;margin-top:0px;orphans:2;overflow-wrap:break-word;text-align:left;text-decoration:none;text-indent:0px;text-transform:none;-webkit-text-stroke-width:0px;white-space:normal;word-spacing:0px;">
<span style="font-size:16px;">Jian-qi Huang</span>
</p>
<br>
<br>
<br>
<blockquote class="ReferenceQuote" style="padding-left:5px;margin-left:5px;border-left:#b6b6b6 2px solid;margin-right:0;" name="replyContent">
-----原始邮件-----<br>
<b>发件人:</b><span id="rc_from">"Paolo Giannozzi" <p.giannozzi@gmail.com></span><br>
<b>发送时间:</b><span id="rc_senttime">2020-07-15 02:29:55 (星期三)</span><br>
<b>收件人:</b> "Quantum ESPRESSO users Forum" <users@lists.quantum-espresso.org><br>
<b>抄送:</b> <br>
<b>主题:</b> Re: [QE-users] a problem in the source code of plotrho.f90<br>
<br>
<div dir="ltr">
<div>
It is a (very old) programming choice: "plotrho" was devised to be run interactively, so if it does not prompt for a variable, there is no need to supply it
</div>
<div>
<br>
</div>
<div>
Paolo<br>
</div>
</div>
<br>
<div class="gmail_quote">
<div class="gmail_attr" dir="ltr">
On Tue, Jul 14, 2020 at 4:41 PM <<a href="mailto:jqhuang16b@imr.ac.cn">jqhuang16b@imr.ac.cn</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid #CCCCCC;padding-left:1ex;">
<p>
<span style="font-size:16px;">Dear QE developers,</span>
</p>
<p>
<br>
</p>
<p>
<span style="font-size:16px;">There seems to be a problem in the </span><span style="font-size:16px;">plotrho.f90 code(qe6.5, also in prev</span><span style="font-size:16px;">ious version</span><span style="font-size:16px;">), between line 93 and 99, as following:</span>
</p>
<p>
<br>
</p>
<p>
<span style="font-size:16px;"> IF (rhomin > 0.d0) THEN</span><br>
<span style="font-size:16px;"> WRITE( stdout,'("Logarithmic scale (y/n)? > ")', advance="NO")</span><br>
<span style="font-size:16px;"> READ (5, '(a)') ans</span><br>
<span style="font-size:16px;"> logarithmic_scale = ans/='n'.and.ans/='N'</span><br>
<span style="font-size:16px;"> ELSE</span><br>
<span style="font-size:16px;"> logarithmic_scale = .false.</span><br>
<span style="font-size:16px;"> ENDIF</span>
</p>
<p>
<br>
</p>
<p>
<span style="font-size:16px;">for the case rhomin < 0.d0 (may occur due to the error in</span><span style="font-size:16px;"> the numerical calculation</span><span style="font-size:16px;">), it won't read from the unit=5 file, </span>
</p>
<p>
<span style="font-size:16px;">which leads to the program</span><span style="font-size:16px;"> termination in the subsequent read</span><span style="font-size:16px;"> because of the wrong data type.</span>
</p>
<p>
<span style="font-size:16px;">So a tiny modification as follows can solve the problem</span>
</p>
<p>
<br>
</p>
<p>
<span style="font-size:16px;"> IF (rhomin > 0.d0) THEN</span><br>
<span style="font-size:16px;"> WRITE( stdout,'("Logarithmic scale (y/n)? > ")', advance="NO")</span><br>
<span style="font-size:16px;"> READ (5, '(a)') ans</span><br>
<span style="font-size:16px;"> logarithmic_scale = ans/='n'.and.ans/='N'</span><br>
<span style="font-size:16px;"> ELSE</span>
</p>
<p>
<span style="font-size:16px;"> </span><span style="font-size:16px;">READ (5, '(a)') ans</span><span style="font-size:16px;"></span><br>
<span style="font-size:16px;"> logarithmic_scale = .false.</span><br>
<span style="font-size:16px;"> ENDIF</span>
</p>
<p>
<span style="font-size:16px;"></span>
</p>
<p>
<br>
</p>
<p>
<br>
</p>
<p>
<br>
</p>
<p>
<span style="font-size:16px;">Best regards,</span>
</p>
<p>
<span style="font-size:16px;">Jian-qi Huang</span><span style="font-size:16px;"> </span>
</p>
<p>
<span style="font-size:16px;"></span>
</p>
<br>
<br>
<br>
<span>
<hr align="left" style="margin:0.5em 0px;width:10em;height:1px;background-color:#999999;border:medium none;">
<p>
Jian-qi Huang
</p>
<p>
<span>Magnetism and Magnetic Materials Division</span><br>
<span>Institute of Metal Research </span><br>
<span>Chinese Academy of Sciences</span><br>
<span>72 Wenhua Road, Shenyang 110016, China</span>
</p>
<p>
<span>email:<a href="mailto:jqhuang16b@imr.ac.cn" target="_blank">jqhuang16b@imr.ac.cn</a></span>
</p>
<p>
<span><br>
</span>
</p>
</span>_______________________________________________<br>
Quantum ESPRESSO is supported by MaX (<a href="http://www.max-centre.eu/quantum-espresso" target="_blank" rel="noreferrer">www.max-centre.eu/quantum-espresso</a>)<br>
users mailing list <a href="mailto:users@lists.quantum-espresso.org" target="_blank">users@lists.quantum-espresso.org</a><br>
<a href="https://lists.quantum-espresso.org/mailman/listinfo/users" target="_blank" rel="noreferrer">https://lists.quantum-espresso.org/mailman/listinfo/users</a>
</blockquote>
</div>
<br clear="all">
<br>
-- <br>
<div class="gmail_signature" dir="ltr">
<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>
</blockquote>