<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<style type="text/css">
<!--
#send_mail {
font-family: "Courier New";
background:#FFFFFF;
color:#000000;
}
#send_mail a {
color:#999999
}
#send_mail a:hover {
color:#0000FF
}
#send_mail div {
color:#000000;
font-family: "Courier New";
font-size:14px;
line-height:150%;
}
#send_mail .usersign {
line-height:100%;
}
-->
</style>
<body id="send_mail">
<div>Hi,
<BR>
<BR>
I agree with you. I also found this bug as you said.
<BR>
<BR>
Yanling
<BR>
<BR>
<BR>
----On Wed, 22 Aug 2012 15:06:20 +0200 wrote: ----
<BR>
<BR>
<BR>
</FONT><FONT color=#444444>> Date: Wed, 22 Aug 2012 15:06:12 +0200
<BR>
</FONT><FONT color=#444444>> From: Giovanni Pizzi
<BR>
</FONT><FONT color=#444444>> Subject: [Pw_forum] Bug in QE 5.0 with ibrav=0 and using a instead of
<BR>
</FONT><FONT color=#444444>> celldm
<BR>
</FONT><FONT color=#444444>> To: <A href=mailto:pw_forum@pwscf.org>pw_forum@pwscf.org</A>
<BR>
</FONT><FONT color=#444444>> Message-ID:
<BR>
</FONT><FONT color=#444444>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
<BR>
</FONT><FONT color=#444444>>
<BR>
</FONT><FONT color=#444444>> Dear all,
<BR>
</FONT><FONT color=#444444>> I believe there is a bug in QE 5.0 (pw.x) that occurs when using ibrav=0
<BR>
</FONT><FONT color=#444444>> and defining 'a' instead of 'celldm(1)'.
<BR>
</FONT><FONT color=#444444>> In this case, celldm is not set and remains equal to zero. (This
<BR>
</FONT><FONT color=#444444>> behavior was different in 4.3.2, where instead the celldm(1) value was
<BR>
</FONT><FONT color=#444444>> set from the 'a' value.)
<BR>
</FONT><FONT color=#444444>>
<BR>
</FONT><FONT color=#444444>> This doesn't seem to create problems in the pw.x calculation.
<BR>
</FONT><FONT color=#444444>> However, in the matdyn files generated by ph.x, the celldm(1) is set to
<BR>
</FONT><FONT color=#444444>> zero.
<BR>
</FONT><FONT color=#444444>> When the matdyn files are then given to q2r.x, the code crashes,
<BR>
</FONT><FONT color=#444444>> complaining of a wrong celldm value.
<BR>
</FONT><FONT color=#444444>>
<BR>
</FONT><FONT color=#444444>> In particular this is what happens in q2r.x:
<BR>
</FONT><FONT color=#444444>> 1. the first q point is read (matdyn1) using the routine
<BR>
</FONT><FONT color=#444444>> read_dyn_from_file; celldm(1) is set to 0
<BR>
</FONT><FONT color=#444444>> 2. the code calls the routine latgen: this routine sets celldm(1) to the
<BR>
</FONT><FONT color=#444444>> a value different from zero (moreover this value may be wrong if 'a' in
<BR>
</FONT><FONT color=#444444>> the input file was not set to the length of the first lattice vector)
<BR>
</FONT><FONT color=#444444>> 3. the code reads the second q point (matdyn2) and compares the celldm
<BR>
</FONT><FONT color=#444444>> value read from file (which is zero) with the old value (which was set
<BR>
</FONT><FONT color=#444444>> to a value different from zero at step 2): being different, the code stops.
<BR>
</FONT><FONT color=#444444>>
<BR>
</FONT><FONT color=#444444>> I think that to correct it, one should replace the following lines
<BR>
</FONT><FONT color=#444444>> (cell_base.f90, lines 152 and following)
<BR>
</FONT><FONT color=#444444>> IF( celldm( 1 ) /= 0.0_DP ) THEN
<BR>
</FONT><FONT color=#444444>> alat = celldm( 1 )
<BR>
</FONT><FONT color=#444444>> ELSE IF ( a /= 0.0_dp ) THEN
<BR>
</FONT><FONT color=#444444>> alat = a / bohr_radius_angs
<BR>
</FONT><FONT color=#444444>> ELSE
<BR>
</FONT><FONT color=#444444>> alat = SQRT ( at(1,1)**2+at(2,1)**2+at(3,1)**2 )
<BR>
</FONT><FONT color=#444444>> END IF
<BR>
</FONT><FONT color=#444444>> at(:,:) = at(:,:) / alat
<BR>
</FONT><FONT color=#444444>>
<BR>
</FONT><FONT color=#444444>> with
<BR>
</FONT><FONT color=#444444>> IF( celldm( 1 ) /= 0.0_DP ) THEN
<BR>
</FONT><FONT color=#444444>> alat = celldm( 1 )
<BR>
</FONT><FONT color=#444444>> ELSE IF ( a /= 0.0_dp ) THEN
<BR>
</FONT><FONT color=#444444>> alat = a / bohr_radius_angs
<BR>
</FONT><FONT color=#444444>> celldm( 1 ) = alat
<BR>
</FONT><FONT color=#444444>> ELSE
<BR>
</FONT><FONT color=#444444>> alat = SQRT ( at(1,1)**2+at(2,1)**2+at(3,1)**2 )
<BR>
</FONT><FONT color=#444444>> celldm( 1 ) = alat
<BR>
</FONT><FONT color=#444444>> END IF
<BR>
</FONT><FONT color=#444444>> at(:,:) = at(:,:) / alat
<BR>
</FONT><FONT color=#444444>>
<BR>
</FONT><FONT color=#444444>> Let me know what you think.
<BR>
</FONT><FONT color=#444444>>
<BR>
</FONT><FONT color=#444444>> Best,
<BR>
</FONT><FONT color=#444444>> Giovanni Pizzi
<BR>
</FONT><FONT color=#444444>>
<BR>
</FONT><FONT color=#444444>>
<BR>
</FONT><FONT color=#444444>>
<BR>
</FONT><FONT color=#444444>> --
<BR>
</FONT><FONT color=#444444>> Giovanni Pizzi
<BR>
</FONT><FONT color=#444444>> Post-doctoral Research Scientist
<BR>
</FONT><FONT color=#444444>> EPFL STI IMX THEOS
<BR>
</FONT><FONT color=#444444>> MXC 319 (B?timent MXC)
<BR>
</FONT><FONT color=#444444>> Station 12
<BR>
</FONT><FONT color=#444444>> CH-1015 Lausanne (Switzerland)
<BR>
</FONT><FONT color=#444444>> Phone: +41 21 69 31159
<BR>
</FONT><FONT color=#444444>>
<BR>
</FONT><FONT color=#444444>>
<BR>
</FONT><FONT color=#444444>>
<BR>
</FONT><FONT color=#444444>> ------------------------------
<BR>
</FONT><FONT color=#444444>>
<BR>
</FONT><FONT color=#444444>> _______________________________________________
<BR>
</FONT><FONT color=#444444>> Pw_forum mailing list
<BR>
</FONT><FONT color=#444444>> <A href=mailto:Pw_forum@pwscf.org>Pw_forum@pwscf.org</A>
<BR>
</FONT><FONT color=#444444>> <A href=http://www.democritos.it/mailman/listinfo/pw_forum target=_blank>http://www.democritos.it/mailman/listinfo/pw_forum</A>
<BR>
</FONT><FONT color=#444444>>
<BR>
</FONT><FONT color=#444444>>
<BR>
</FONT><FONT color=#444444>> End of Pw_forum Digest, Vol 62, Issue 37
<BR>
</FONT><FONT color=#444444>> ****************************************
<BR>
</FONT><FONT color=#444444>>
<BR>
<BR>
<BR>
------
<BR>
ISSP
<BR>
</div>
</body>
</html>