[QE-users] a problem in the source code of plotrho.f90

jqhuang16b at imr.ac.cn jqhuang16b at imr.ac.cn
Wed Jul 15 03:03:18 CEST 2020


Dear Paolo,




"plotrho" was devised to be run interactively.

Now I see. I ignored that unit=5 denotes input from the keyboard by default. Thank you.




Best regards,

Jian-qi Huang




-----原始邮件-----
发件人:"Paolo Giannozzi" <p.giannozzi at gmail.com>
发送时间:2020-07-15 02:29:55 (星期三)
收件人: "Quantum ESPRESSO users Forum" <users at lists.quantum-espresso.org>
抄送:
主题: Re: [QE-users] a problem in the source code of plotrho.f90


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


Paolo



On Tue, Jul 14, 2020 at 4:41 PM <jqhuang16b at imr.ac.cn> wrote:


Dear QE developers,




There seems to be a problem in the plotrho.f90 code(qe6.5, also in previous version), between line 93 and 99, as following:




  IF (rhomin > 0.d0) THEN
     WRITE( stdout,'("Logarithmic scale (y/n)? > ")', advance="NO")
     READ (5, '(a)') ans
     logarithmic_scale = ans/='n'.and.ans/='N'
  ELSE
     logarithmic_scale = .false.
  ENDIF




for the case rhomin < 0.d0 (may occur due to the error in the numerical calculation), it won't read from the unit=5 file, 

which leads to the program termination in the subsequent read because of the wrong data type.

So a tiny modification as follows can solve the problem




  IF (rhomin > 0.d0) THEN
     WRITE( stdout,'("Logarithmic scale (y/n)? > ")', advance="NO")
     READ (5, '(a)') ans
     logarithmic_scale = ans/='n'.and.ans/='N'
  ELSE

      READ (5, '(a)') ans
     logarithmic_scale = .false.
  ENDIF










Best regards,

Jian-qi Huang 






Jian-qi Huang

Magnetism and Magnetic Materials Division
Institute of Metal Research
Chinese Academy of Sciences
72 Wenhua Road, Shenyang 110016, China

email:jqhuang16b at imr.ac.cn




_______________________________________________
Quantum ESPRESSO is supported by MaX (www.max-centre.eu/quantum-espresso)
users mailing list users at lists.quantum-espresso.org
https://lists.quantum-espresso.org/mailman/listinfo/users


--

Paolo Giannozzi, Dip. Scienze Matematiche Informatiche e Fisiche,
Univ. Udine, via delle Scienze 208, 33100 Udine, Italy
Phone +39-0432-558216, fax +39-0432-558222

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/users/attachments/20200715/6e87a005/attachment.html>


More information about the users mailing list